Closed calixteman closed 4 years ago
Would it suffice to just expose the symbol constants in a sub namespace? Parsing is generally very fast, and duplicating the mapping at this point might easily lead to oversight when implementing new types.
The first thing I did was to copy/paste the constants and then filter on raw_kind() using the same "or" stuff between constants and I thought it wasn't nice to have to copy/paste some code to use a lib. But maybe you're right when saying: parsing is fast enough. I'll make some benches to see if there are significant differences.
The goal of this patch is to be able to get the type of the symbol without parsing it. This should make easier filtering when iterating over symbols.