From d68db8aee2ccc04dcc53221655d9780070ee6b6e Mon Sep 17 00:00:00 2001 From: ice1000 Date: Wed, 9 Oct 2019 20:00:40 -0400 Subject: [PATCH] [ narc ] Some parser fixes --- grammar/narc.bnf | 8 ++++---- res/META-INF/plugin.xml | 1 + res/fileTemplates/internal/Narc File.narc.ft | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/grammar/narc.bnf b/grammar/narc.bnf index 112ca98..ec31082 100644 --- a/grammar/narc.bnf +++ b/grammar/narc.bnf @@ -40,12 +40,12 @@ expr ::= private telescopic ::= telescopicExpr | telescopic2Expr -project ::= DOT nameUsage { pin=1 } +projectOp ::= DOT nameUsage { pin=1 } -projectExpr ::= expr project +projectExpr ::= expr projectOp piExpr ::= expr ARROW expr telescopic2Expr ::= LBRACE nameDecl+ COLON expr RBRACE { - pin=1 + pin=3 } telescopicExpr ::= LPAREN nameDecl+ COLON expr RPAREN { pin=3 @@ -76,7 +76,7 @@ constructor ::= KW_CONSTRUCTOR nameDecl sig? SEMI { pin=1 } -copattern ::= project | pattern +copattern ::= projectOp | pattern pattern ::= nameDecl | inaccessiblePattern | consPattern inaccessiblePattern ::= LINACCESS expr RINACCESS { pin=1 } diff --git a/res/META-INF/plugin.xml b/res/META-INF/plugin.xml index 7e4e7c4..84a00ae 100644 --- a/res/META-INF/plugin.xml +++ b/res/META-INF/plugin.xml @@ -194,6 +194,7 @@ +