Skip to content

Commit

Permalink
add support for imoprt and :: separator
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmcgrath13 authored Mar 13, 2024
1 parent 763cfc8 commit 920ed0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/syntax.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ WithUseDeclaration {
kw<"with"> expression kw<"use"> ("..." | commaSep1<Alias>)
}

ImportDeclaration {
kw<"from"> LhsId kw<"import"> ("..." | commaSep1<Alias>)
}

id { BasicId | ConstructorId | kw<"value"> | kw<"entity"> | kw<"type"> }

ParenOpId { "(" Operator !parenOp ")" }
Expand Down Expand Up @@ -495,7 +499,7 @@ formalsParen { "(" Formals? ")" }
RelnameStringLiteral { ":" StaticStringLiteral }
RelnameMultilineStringLiteral { ":" StaticMultilineStringLiteral }

QualifiedNameElem { ":" (BasicId | ConstructorId) | ":(" Operator ")" }
QualifiedNameElem { ":" (BasicId | ConstructorId) | ":(" Operator ")" | "::" (BasicId | ConstructorId) | "::(" Operator ")" }
InterpolationId { "%" basicIdentifier }

quote1 { '"' }
Expand Down

0 comments on commit 920ed0d

Please sign in to comment.