tools/pas2c/PascalParser.hs
changeset 11398 c3a535886806
parent 11370 210f12d36822
child 14256 3a9e4f35aa68
equal deleted inserted replaced
11397:a7efecf4f49f 11398:c3a535886806
   237     try $ rangeft
   237     try $ rangeft
   238     , iD >>= return . Range
   238     , iD >>= return . Range
   239     ] <?> "range declaration"
   239     ] <?> "range declaration"
   240     where
   240     where
   241     rangeft = do
   241     rangeft = do
   242     e1 <- initExpression
   242         e1 <- initExpression
   243     string' ".."
   243         string' ".."
   244     e2 <- initExpression
   244         e2 <- initExpression
   245     return $ RangeFromTo e1 e2
   245         return $ RangeFromTo e1 e2
   246 
   246 
   247 typeVarDeclaration :: Bool -> Parsec String u [TypeVarDeclaration]
   247 typeVarDeclaration :: Bool -> Parsec String u [TypeVarDeclaration]
   248 typeVarDeclaration isImpl = (liftM concat . many . choice) [
   248 typeVarDeclaration isImpl = (liftM concat . many . choice) [
   249     varSection,
   249     varSection,
   250     constSection,
   250     constSection,