refactorings (#20536)
* refactoring * refactoring: removed unused macroUsagesSection * enum instead of bool for better readability
This commit is contained in:
parent
e290b028ab
commit
08ae3467b9
9 changed files with 16 additions and 16 deletions
|
|
@ -30,7 +30,7 @@ proc genEnumToStrProc*(t: PType; info: TLineInfo; g: ModuleGraph; idgen: IdGener
|
|||
assert(t.n[i].kind == nkSym)
|
||||
var field = t.n[i].sym
|
||||
let val = if field.ast == nil: field.name.s else: field.ast.strVal
|
||||
caseStmt.add newTree(nkOfBranch, newSymNode(field),
|
||||
caseStmt.add newTree(nkOfBranch, newIntTypeNode(field.position, t),
|
||||
newTree(nkStmtList, newTree(nkFastAsgn, newSymNode(res), newStrNode(val, info))))
|
||||
#newIntTypeNode(nkIntLit, field.position, t)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue