diff options
| author | Brian Campbell | 2017-12-06 17:10:30 +0000 |
|---|---|---|
| committer | Brian Campbell | 2017-12-06 17:36:59 +0000 |
| commit | 87a8f3f491c5c5bb65cb7490e10da2c5c9676f17 (patch) | |
| tree | 75008cb1201e26c374c26993c30852781edeb4dd /src/pretty_print_sail.ml | |
| parent | 98ddcaf12bd2ff2c42f2c20fcb145af806a7e6d8 (diff) | |
Add parsing for guards in function clauses
Breaks parsing ambiguities by removing = as an identifier in the old parser
and requiring parentheses for some expressions in the new parser
Diffstat (limited to 'src/pretty_print_sail.ml')
| -rw-r--r-- | src/pretty_print_sail.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index 05dbb9ee..68f414b3 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -490,7 +490,7 @@ let doc_funcl (FCL_aux(FCL_Funcl(id,pexp),_)) = | Pat_aux (Pat_exp (pat,exp),_) -> group (doc_op equals (separate space [doc_id id; doc_atomic_pat pat]) (doc_exp exp)) | Pat_aux (Pat_when (pat,wh,exp),_) -> - group (doc_op equals (separate space [doc_id id; doc_atomic_pat pat; string "if"; doc_exp wh]) + group (doc_op equals (separate space [doc_id id; doc_atomic_pat pat; string "when"; doc_exp wh]) (doc_exp exp)) let doc_fundef (FD_aux(FD_function(r, typa, efa, fcls),_)) = |
