Skip to content

Commit

Permalink
feat: include namespace in grammar, also concat op
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmcgrath13 authored Mar 13, 2024
1 parent 7a0fd6c commit 4aef423
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/syntax.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ declaration[@isGroup=Declaration]
| EntityTypeDeclaration
| ConstraintDeclaration
| ModuleDeclaration
| NamespaceDeclaration
| WithUseDeclaration
}

Expand Down Expand Up @@ -97,6 +98,10 @@ ModuleDeclaration {
Docstring? Annotation* kw<"module"> LhsId formalsBracket* declaration* kw<"end">
}

NamespaceDeclaration {
Docstring? Annotation* kw<"namespace"> LhsId formalsBracket* declaration* kw<"end">
}

WithUseDeclaration {
kw<"with"> expression kw<"use"> ("..." | commaSep1<Alias>)
}
Expand Down Expand Up @@ -436,6 +441,7 @@ formalsParen { "(" Formals? ")" }
| ":>"
| "<++"
| "++>"
| "++"
}

decimalLiteral { $[0-9]+ }
Expand Down

0 comments on commit 4aef423

Please sign in to comment.