Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Parse until loops
Browse files Browse the repository at this point in the history
  • Loading branch information
UnkindPartition committed Mar 19, 2010
1 parent 4bf0092 commit a13fe60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FEATURES
Expand Up @@ -22,5 +22,5 @@ Syntactical:
- case conditionals
+ if conditionals
+ while loops
- until loops
+ until loops
- function definitions
7 changes: 7 additions & 0 deletions Parse.hs
Expand Up @@ -403,6 +403,7 @@ compoundCommand = choice $
, forClause
, ifClause
, whileClause
, untilClause
]

braceGroup = fmap BraceGroup $ between (theReservedWord "{") (theReservedWord "}") compoundList
Expand Down Expand Up @@ -434,6 +435,12 @@ whileClause = do
cmds <- doGroup
return $ While l cmds

untilClause = do
theReservedWord "until"
l <- compoundList
cmds <- doGroup
return $ Until l cmds

ifClause = do
theReservedWord "if"
cond <- compoundList
Expand Down

0 comments on commit a13fe60

Please sign in to comment.