tools/pas2c/PascalParser.hs
changeset 10353 25f325b48a6c
parent 10245 3ccc054c3c3e
child 10747 07ade56c3b4a
equal deleted inserted replaced
10352:2af2309207b0 10353:25f325b48a6c
    90     vs <- m (aVarDecl endsWithSemi) (semi pas)
    90     vs <- m (aVarDecl endsWithSemi) (semi pas)
    91     return vs
    91     return vs
    92 
    92 
    93 aVarDecl :: Bool -> Parsec String u TypeVarDeclaration
    93 aVarDecl :: Bool -> Parsec String u TypeVarDeclaration
    94 aVarDecl endsWithSemi = do
    94 aVarDecl endsWithSemi = do
    95     isVar <- liftM (== Just "var") $
    95     isVar <- liftM (\i -> i == Just "var" || i == Just "out") $
    96         if not endsWithSemi then
    96         if not endsWithSemi then
    97             optionMaybe $ choice [
    97             optionMaybe $ choice [
    98                 try $ string "var"
    98                 try $ string "var"
    99                 , try $ string "const"
    99                 , try $ string "const"
   100                 , try $ string "out"
   100                 , try $ string "out"