Skip to content

✨ Add Token.require_map() - #483

Open
wozhenbang2004 wants to merge 3 commits into
executablebooks:masterfrom
wozhenbang2004:token-require-map-430
Open

wozhenbang2004 wants to merge 3 commits into
executablebooks:masterfrom
wozhenbang2004:token-require-map-430

Conversation

@wozhenbang2004

Copy link
Copy Markdown

Closes #430.

Adds the smaller Token.require_map() accessor discussed in the issue. It returns the existing source map as list[int], or raises ValueError naming the token type when no map is present. Token.map remains optional and the parsing rules are unchanged.

Includes parser-based examples, coverage for missing and reassigned maps, and usage documentation. The Python 3.12 suite passes (1,197 tests), as do all pre-commit hooks, the package build and strict distribution checks.

The documentation build is blocked locally because its notebook kernel cannot start.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a typed way to require a token source map

1 participant