Nimony

The road to Nim 3

nifcoreparse

nimony/src/lib/nifcoreparse.nim

NIF text parser producing a nifcore.TokenBuf.

Reuses the existing nifreader, whose ExpandedToken is independent of the in-memory representation: its ParLe/ParRi events drive nifcore's openTag/closeTag, and atoms drive the builder. The reader's relative line positions are resolved to absolute file/line/col (against a parent stack, exactly like nifstreams.rawNext) and emitted as a sparse LineInfoLit suffix only where the position changes. Callers that need random-access effective locations can request dense line info while parsing.

Note: NIF #comment# decorations are not carried into the token buffer — the codegen path has no use for them.