Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %nonassoc IF
- %nonassoc ELSE
- %%
- ifelse:
- | IF cond = expr left = statement
- { STMT_If { loc = mkLocation $startpos
- ; cond = cond
- ; then_branch = left
- ; else_branch = None
- }}
- | IF cond = expr left = statement ELSE right = statement
- { STMT_If { loc = mkLocation $startpos
- ; cond = cond
- ; then_branch = left
- ; else_branch = Some right
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement