Changeset 3372 for src/Pugs/Parser.hs

Show
Ignore:
Timestamp:
05/18/05 02:43:25 (4 years ago)
Author:
theorbtwo
svk:copy_cache_prev:
4945
Message:

More signatures, a few more haddocks.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Parser.hs

    r3362 r3372  
    236236    return (isMulti, isMethod, name) 
    237237 
     238maybeColon :: RuleParser ([Char] -> [Char]) 
    238239maybeColon = option id $ do 
    239240    char ':' 
     
    354355            return $ Pad scope lexDiff exp 
    355356 
     357-- | A Param representing the default (unnamed) invocant of a method on the given type. 
     358selfParam :: String -> Param 
    356359selfParam typ = MkParam 
    357360    { isInvocant    = True 
     
    536539    return $ Syn "module" [Val . VStr $ name ++ v ++ a] -- XXX 
    537540 
     541-- | The version part of a full class specification. 
     542ruleVersionPart :: RuleParser String 
    538543ruleVersionPart = do -- version - XXX 
    539544    char '-' 
     
    541546    return ('-':str) 
    542547 
     548-- | The author part of a full class specification. 
     549ruleAuthorPart :: RuleParser String 
    543550ruleAuthorPart = do -- author - XXX 
    544551    char '-' 
     
    14561463        ] 
    14571464 
     1465-- | splits the string into expressions on whitespace. 
     1466-- Implements the <> operator at parse-time. 
     1467doSplitStr :: String -> Exp 
    14581468doSplitStr str = case perl6Words str of 
    14591469    []  -> Syn "," [] 
     
    16041614 
    16051615-- Regexps 
     1616 
     1617-- | A parser returning a regex, given a hashref of adverbs and a closing delimiter. 
     1618rxLiteralAny :: Exp -> Char -> RuleParser Exp 
    16061619rxLiteralAny adverbs 
    16071620    | Syn "\\{}" [Syn "," pairs] <- adverbs