Changeset 3372 for src/Pugs/Parser.hs
- Timestamp:
- 05/18/05 02:43:25 (4 years ago)
- svk:copy_cache_prev:
- 4945
- Files:
-
- 1 modified
-
src/Pugs/Parser.hs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Parser.hs
r3362 r3372 236 236 return (isMulti, isMethod, name) 237 237 238 maybeColon :: RuleParser ([Char] -> [Char]) 238 239 maybeColon = option id $ do 239 240 char ':' … … 354 355 return $ Pad scope lexDiff exp 355 356 357 -- | A Param representing the default (unnamed) invocant of a method on the given type. 358 selfParam :: String -> Param 356 359 selfParam typ = MkParam 357 360 { isInvocant = True … … 536 539 return $ Syn "module" [Val . VStr $ name ++ v ++ a] -- XXX 537 540 541 -- | The version part of a full class specification. 542 ruleVersionPart :: RuleParser String 538 543 ruleVersionPart = do -- version - XXX 539 544 char '-' … … 541 546 return ('-':str) 542 547 548 -- | The author part of a full class specification. 549 ruleAuthorPart :: RuleParser String 543 550 ruleAuthorPart = do -- author - XXX 544 551 char '-' … … 1456 1463 ] 1457 1464 1465 -- | splits the string into expressions on whitespace. 1466 -- Implements the <> operator at parse-time. 1467 doSplitStr :: String -> Exp 1458 1468 doSplitStr str = case perl6Words str of 1459 1469 [] -> Syn "," [] … … 1604 1614 1605 1615 -- Regexps 1616 1617 -- | A parser returning a regex, given a hashref of adverbs and a closing delimiter. 1618 rxLiteralAny :: Exp -> Char -> RuleParser Exp 1606 1619 rxLiteralAny adverbs 1607 1620 | Syn "\\{}" [Syn "," pairs] <- adverbs
