schemaparse: definition annotations come after line comments

This commit is contained in:
Emery Hemingway 2024-05-22 19:17:06 +03:00
parent 9d328b3d0c
commit 4ebca473df
1 changed files with 1 additions and 1 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