tools/pas2c/PascalParser.hs
branchqmlfrontend
changeset 11403 b894922d58cc
parent 11398 c3a535886806
child 14235 3a9e4f35aa68
equal deleted inserted replaced
11076:fcbdee9cdd74 11403:b894922d58cc
   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,