schemaparse: fix parsing of annotated named record fields
This commit is contained in:
parent
f65e206864
commit
ea6c8118e8
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
# auto-update-version
|
||||
|
||||
version = "20240506"
|
||||
version = "20240522"
|
||||
author = "Emery Hemingway"
|
||||
description = "data model and serialization format"
|
||||
license = "Unlicense"
|
||||
|
|
|
@ -263,12 +263,12 @@ const parser = peg("Schema", p: ParseState):
|
|||
pushStack n
|
||||
|
||||
NamedPattern <- ((atId * ?Annotation * SimplePattern) | Pattern):
|
||||
if capture.len == 2:
|
||||
if capture.len > 1:
|
||||
var n = initRecord(toSymbol"named", toSymbol $1, popStack())
|
||||
pushStack n
|
||||
|
||||
NamedSimplePattern <- ((atId * ?Annotation * SimplePattern) | SimplePattern):
|
||||
if capture.len == 2:
|
||||
if capture.len > 1:
|
||||
var n = initRecord(toSymbol"named", toSymbol $1, popStack())
|
||||
pushStack n
|
||||
|
||||
|
|
Loading…
Reference in New Issue