EnumUtils, speed up findStr in compiler (#15777)
* add parseEnumRange * fix runnable example * update changelog * use parseEnumRange in compiler * reorganise code * add changelog, make single normalizer argument
This commit is contained in:
parent
b8bcf236dd
commit
d62f3627aa
6 changed files with 89 additions and 68 deletions
|
|
@ -331,7 +331,7 @@ proc processDynLib(c: PContext, n: PNode, sym: PSym) =
|
|||
|
||||
proc processNote(c: PContext, n: PNode) =
|
||||
template handleNote(enumVals, notes) =
|
||||
let x = findStr(enumVals, n[0][1].ident.s, errUnknown)
|
||||
let x = findStr(enumVals.a, enumVals.b, n[0][1].ident.s, errUnknown)
|
||||
if x != errUnknown:
|
||||
nk = TNoteKind(x)
|
||||
let x = c.semConstBoolExpr(c, n[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue