Replace prsFoo() with foo()
This commit is contained in:
parent
cb4f4df4f1
commit
2016974e95
|
@ -360,14 +360,20 @@ proc generateProcs(result: var seq[PNode]; name: string; sn: SchemaNode) =
|
||||||
newEmpty())
|
newEmpty())
|
||||||
initRecordCall.add(
|
initRecordCall.add(
|
||||||
nn(nkCall, ident"toPreserve", id, ident"EmbeddedType"))
|
nn(nkCall, ident"toPreserve", id, ident"EmbeddedType"))
|
||||||
|
var procId = name
|
||||||
|
procId[0] = procId[0].toLowerAscii
|
||||||
result.add nn(nkProcDef,
|
result.add nn(nkProcDef,
|
||||||
exportIdent("prs" & name),
|
exportIdent(procId),
|
||||||
newEmpty(),
|
newEmpty(),
|
||||||
newEmpty(),
|
newEmpty(),
|
||||||
params,
|
params,
|
||||||
newEmpty(),
|
newEmpty(),
|
||||||
newEmpty(),
|
newEmpty(),
|
||||||
nn(nkStmtList, initRecordCall))
|
nn(nkStmtList,
|
||||||
|
PNode(
|
||||||
|
kind: nkCommentStmt,
|
||||||
|
comment: "Preserves constructor for ``" & name & "``."),
|
||||||
|
initRecordCall))
|
||||||
else: discard
|
else: discard
|
||||||
|
|
||||||
proc generateNimFile*(scm: Schema; path: string) =
|
proc generateNimFile*(scm: Schema; path: string) =
|
||||||
|
|
Loading…
Reference in New Issue