git.haldean.org ubik / 57c4d24
allow top_exprs in tails of cond blocks These were previously exprs out of my own overabundance of caution, I believe. Since each tail statement is terminated by either a . or a }, neither of which can be found within the top layer of a top_expr, it's perfectly unambiguous to stick a top_expr after the =>. This allows for this: ? { . => ? { . => 0 } } Whereas previously you needed to use ? { . => (? { . => 0 }) } Haldean Brown 5 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
5252 ;
5353
5454 pattern_case_stmt
55 : MEMBER pattern IMPLIES expr
55 : MEMBER pattern IMPLIES top_expr
5656 {
5757 alloc($$, 1, struct ubik_ast_case);
5858 $$->head = $2;
8484 ;
8585
8686 last_pred_case_stmt
87 : MEMBER IMPLIES expr
87 : MEMBER IMPLIES top_expr
8888 {
8989 alloc($$, 1, struct ubik_ast_case);
9090 $$->head = NULL;