Rain: added parsing of variable declarations
This commit is contained in:
parent
1bc92b0b37
commit
cab4ec2113
|
@ -246,7 +246,8 @@ tupleDef = do {sLeftR ; tm <- sepBy tupleDefMember sComma ; sRightR ; return tm}
|
|||
tupleDefMember = do {t <- dataType ; sColon ; n <- name ; return (n,t)}
|
||||
|
||||
declaration :: RainParser (A.Structured -> A.Structured)
|
||||
declaration = return id
|
||||
declaration = do {t <- dataType; sColon ; n <- name ; sSemiColon ;
|
||||
return $ A.Spec (findMeta t) $ A.Specification (findMeta t) n $ A.Declaration (findMeta t) t }
|
||||
|
||||
topLevelDecl :: RainParser A.Structured
|
||||
topLevelDecl = do {m <- sProcess ; procName <- name ; params <- tupleDef ; body <- block ;
|
||||
|
|
Loading…
Reference in New Issue
Block a user