summary refs log tree commit diff stats
path: root/lib/std/enumutils.nim
Commit message (Collapse)AuthorAgeFilesLines
* complete std prefixes for stdlib (#22887)ringabout2023-10-301-2/+2
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* fixes #22844; uses arrays to store holeyenums for iterations; much more ↵ringabout2023-10-201-1/+1
| | | | | efficient than sets and reasonable for holeyenums (#22845) fixes #22844
* make parseEnum skip type aliases for enum type sym (#22727)metagn2023-09-191-1/+2
| | | fixes #22726
* avoid `AnyEnumConv` warning in `genEnumCaseStmt` (#22061)Etan Kissling2023-06-101-10/+11
| | | | | | | When parsing enums from strings using `genEnumCaseStmt`, `AnyEnumConv` warnings are generated due to conversion from integer value. It seems possible meanwhile to refer to the actual `enum` value by symbol instead of being required to do the conversion from `ord`, even when the `enum` is defined in a `block`.
* minor code cleanups (#21215)Andreas Rumpf2023-01-021-1/+1
|
* move assertions out of system (#19599)flywind2022-03-231-0/+4
|
* fix parseEnum cannot parse enum with const fields (#19466)flywind2022-02-041-2/+7
| | | fix #19463
* Allow `nnkAccQuoted` in `genEnumCaseStmt` (#18606)Vindaar2021-07-291-1/+5
| | | | | | | | | | * [enumutils] provide node kind for `Invalid node type` error * [enumutils] add support for nnkAccQuoted in `genEnumCaseStmt` For reasons unknown to me, when running `nim doc` on a file that uses `parseEnum` with an enum that contains accented quotes errors at CT with the `Invalid node for type` error. Further errors are raised, probably because the enum parsing fails?
* various small documentation improvements (#18602)Miran2021-07-281-6/+25
|
* jsonutils: add customization for toJson via `ToJsonOptions`; generalize ↵Timothee Cour2021-05-181-2/+63
| | | | | | | | | | | | | | | | | | | symbolName; add symbolRank (#18029) * jsonutils: add customization for toJson via `ToJsonOptions` * add enumutils.symbolRank * lookup table implementation for HoleyEnum * cleanup * changelog * fixup * Update lib/std/jsonutils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-211-4/+4
| | | | | | | | * 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
* add typetraits.OrdinalEnum, enumutils.symbolName (#17281)Timothee Cour2021-03-101-3/+25
|
* add enumutils.items for sparse enums, typetraits.SomeSparseEnum (#17080)Timothee Cour2021-02-231-2/+17
| | | | | | | * add enumutils.items for enum with holes * changelog * ref in lib.rst * use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept * address comment: rename back to enum with holes
* EnumUtils, speed up findStr in compiler (#15777)cooldome2020-11-031-0/+64
* add parseEnumRange * fix runnable example * update changelog * use parseEnumRange in compiler * reorganise code * add changelog, make single normalizer argument