diff options
author | 2008-08-07 13:09:26 -0400 | |
---|---|---|
committer | 2008-08-07 13:09:26 -0400 | |
commit | 51fd5b1af6b2af7706c0c8604129d99e504a2d36 (patch) | |
tree | dc6203b3be07a7d45f5f17b9339405eca54deadf /src/lacweb.grm | |
parent | befe86e703563f4f9ce8b8b0e36ae19e84b0ca8b (diff) |
Checkboxes
Diffstat (limited to 'src/lacweb.grm')
-rw-r--r-- | src/lacweb.grm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lacweb.grm b/src/lacweb.grm index cc68d380..3c3b87d5 100644 --- a/src/lacweb.grm +++ b/src/lacweb.grm @@ -51,7 +51,7 @@ fun uppercaseFirst "" = "" | FN | PLUSPLUS | MINUSMINUS | DOLLAR | TWIDDLE | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | EXTERN | INCLUDE | OPEN | CONSTRAINT | CONSTRAINTS | EXPORT - | CASE + | CASE | IF | THEN | ELSE | XML_BEGIN of string | XML_END | NOTAGS of string @@ -318,6 +318,12 @@ eexp : eapps (eapps) | LPAREN eexp RPAREN DCOLON cexp (EAnnot (eexp, cexp), s (LPARENleft, cexpright)) | eexp MINUSMINUS cexp (ECut (eexp, cexp), s (eexpleft, cexpright)) | CASE eexp OF barOpt branch branchs (ECase (eexp, branch :: branchs), s (CASEleft, branchsright)) + | IF eexp THEN eexp ELSE eexp (let + val loc = s (IFleft, eexp3right) + in + (ECase (eexp1, [((PCon (["Basis"], "True", NONE), loc), eexp2), + ((PCon (["Basis"], "False", NONE), loc), eexp3)]), loc) + end) eterm : LPAREN eexp RPAREN (#1 eexp, s (LPARENleft, RPARENright)) |