schema: emit "tuple[]" for literal object fields
This commit is contained in:
parent
cd2dde6d71
commit
b9d8275624
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "20230503"
|
version = "20230504"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "data model and serialization format"
|
description = "data model and serialization format"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
|
|
|
@ -513,7 +513,7 @@ proc addField(recList: PNode; loc: Location; known: var TypeTable; sp: SimplePat
|
||||||
nn(nkExprColonExpr,
|
nn(nkExprColonExpr,
|
||||||
ident"preservesLiteral",
|
ident"preservesLiteral",
|
||||||
toStrLit(loc, sp))))
|
toStrLit(loc, sp))))
|
||||||
recList.add identDef(scm, id, TypeSpec(node: ident"bool"))
|
recList.add identDef(scm, id, TypeSpec(node: ident"tuple[]"))
|
||||||
elif sp.orKind == SimplePatternKind.embedded and not scm.hasEmbeddedType:
|
elif sp.orKind == SimplePatternKind.embedded and not scm.hasEmbeddedType:
|
||||||
let id = nn(nkPragmaExpr,
|
let id = nn(nkPragmaExpr,
|
||||||
id, nn(nkPragma, ident"preservesEmbedded"))
|
id, nn(nkPragma, ident"preservesEmbedded"))
|
||||||
|
|
Loading…
Reference in New Issue