Skip to content

Expose hidden lexer token metadata accessors - #28443

Merged
MichaReiser merged 2 commits into
mainfrom
micha/expose-lexer-current-token-metadata
Sep 9, 2026
Merged

MichaReiser merged 2 commits into
mainfrom
micha/expose-lexer-current-token-metadata

Conversation

@MichaReiser

@MichaReiser MichaReiser commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Add #[doc(hidden)] to lex and make Lexer::current_flags and Lexer::current_range public with the same attribute.

Obligatory warning. This APIs are not part of Ruff's public API. They may change without notice or even be removed without a replacement.

Closes #28415

Test Plan

Testing: Parser crate tests and repository hooks passed; an external caller compiled and generated documentation omits the hidden items.

@astral-sh-bot

astral-sh-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@MichaReiser MichaReiser added the internal An internal refactor or improvement (not for changelogs) label Sep 9, 2026
@astral-sh-bot

astral-sh-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser
MichaReiser merged commit a99b96b into main Sep 9, 2026
69 checks passed
@MichaReiser
MichaReiser deleted the micha/expose-lexer-current-token-metadata branch September 9, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement (not for changelogs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Lexer::current_range and Lexer::current_flags public?

1 participant