Add layout grammar

This commit is contained in:
Martin Fredin 2023-04-03 09:24:13 +02:00
parent bd02f52795
commit cc5755c3a9
5 changed files with 155 additions and 176 deletions

View file

@ -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 " ";