Add layout grammar
This commit is contained in:
parent
bd02f52795
commit
cc5755c3a9
5 changed files with 155 additions and 176 deletions
10
Grammar.cf
10
Grammar.cf
|
|
@ -37,7 +37,6 @@ internal MkTEVar. TEVar ::= LIdent;
|
|||
Data. Data ::= "data" Type "where" "{" [Inj] "}" ;
|
||||
|
||||
Inj. Inj ::= UIdent ":" Type ;
|
||||
separator nonempty Inj " " ;
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- * Expressions
|
||||
|
|
@ -76,8 +75,13 @@ PInj. Pattern ::= UIdent [Pattern1];
|
|||
-- * AUX
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
terminator Def ";";
|
||||
terminator Branch ";" ;
|
||||
layout "of", "where", "let";
|
||||
layout stop "in";
|
||||
layout toplevel;
|
||||
|
||||
separator Def ";";
|
||||
separator Branch ";" ;
|
||||
separator Inj ";";
|
||||
|
||||
separator LIdent "";
|
||||
separator Type " ";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue