Skip to content

Commit

Permalink
[ narc ] Some parser fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Oct 10, 2019
1 parent 2ad82fb commit d68db8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions grammar/narc.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions res/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<lang.commenter language="Narc" implementationClass="org.ice1000.tt.editing.CxxLineCommenter"/>
<lang.braceMatcher language="Narc" implementationClass="org.ice1000.tt.editing.narc.NarcBraceMatcher"/>
<lang.syntaxHighlighterFactory language="Narc" implementationClass="org.ice1000.tt.editing.narc.NarcHighlighterFactory"/>
<lang.parserDefinition language="Narc" implementationClass="org.ice1000.tt.psi.narc.NarcGeneratedParserDefinition"/>

<projectConfigurable
groupId="language"
Expand Down
3 changes: 2 additions & 1 deletion res/fileTemplates/internal/Narc File.narc.ft
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
// Author: ${USER}
//

// TODO: there's no syntax designed yet
definition ${NAME_CAMEL} : Type;
clause ${NAME_CAMEL} : _;

0 comments on commit d68db8a

Please sign in to comment.