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())
|
||||
initRecordCall.add(
|
||||
nn(nkCall, ident"toPreserve", id, ident"EmbeddedType"))
|
||||
var procId = name
|
||||
procId[0] = procId[0].toLowerAscii
|
||||
result.add nn(nkProcDef,
|
||||
exportIdent("prs" & name),
|
||||
exportIdent(procId),
|
||||
newEmpty(),
|
||||
newEmpty(),
|
||||
params,
|
||||
newEmpty(),
|
||||
newEmpty(),
|
||||
nn(nkStmtList, initRecordCall))
|
||||
nn(nkStmtList,
|
||||
PNode(
|
||||
kind: nkCommentStmt,
|
||||
comment: "Preserves constructor for ``" & name & "``."),
|
||||
initRecordCall))
|
||||
else: discard
|
||||
|
||||
proc generateNimFile*(scm: Schema; path: string) =
|
||||
|
|
Loading…
Reference in New Issue