Compare commits

...

2 Commits

1 changed files with 3 additions and 2 deletions

View File

@ -86,7 +86,7 @@ const parser = peg("Schema", p: ParseState):
match(readFile path, state)
p.schema = move state.schema
Definition <- ?Annotation * *LineComment * id * '=' * S * (OrPattern | AndPattern | Pattern):
Definition <- *LineComment * ?Annotation * id * '=' * S * (OrPattern | AndPattern | Pattern):
if p.schema.definitions.hasKey(Symbol $1):
raise newException(ValueError, "duplicate definition of " & $0)
var
@ -287,7 +287,8 @@ const parser = peg("Schema", p: ParseState):
Value <- Preserves.Value:
discard
Annotation <- '@' * (Preserves.String | Preserves.Record) * S
Annotation <- '@' * (Preserves.String | Preserves.Record) * S:
discard
S <- *{ ' ', '\t', '\r', '\n' }