CIs: attempt to use csources_v1 (#16282)
* CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
This commit is contained in:
parent
7bce1f8578
commit
a9b62de895
58 changed files with 142 additions and 143 deletions
|
|
@ -7,16 +7,16 @@
|
|||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
import std/macros
|
||||
from std/typetraits import OrdinalEnum, HoleyEnum
|
||||
import macros
|
||||
from typetraits import OrdinalEnum, HoleyEnum
|
||||
|
||||
# xxx `genEnumCaseStmt` needs tests and runnableExamples
|
||||
|
||||
macro genEnumCaseStmt*(typ: typedesc, argSym: typed, default: typed,
|
||||
macro genEnumCaseStmt*(typ: typedesc, argSym: typed, default: typed,
|
||||
userMin, userMax: static[int], normalizer: static[proc(s :string): string]): untyped =
|
||||
# generates a case stmt, which assigns the correct enum field given
|
||||
# a normalized string comparison to the `argSym` input.
|
||||
# string normalization is done using passed normalizer.
|
||||
# string normalization is done using passed normalizer.
|
||||
# NOTE: for an enum with fields Foo, Bar, ... we cannot generate
|
||||
# `of "Foo".nimIdentNormalize: Foo`.
|
||||
# This will fail, if the enum is not defined at top level (e.g. in a block).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue