schemaparse: definition annotations come after line comments
This commit is contained in:
parent
9d328b3d0c
commit
4ebca473df
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue