Skip to content

feat(parser): add LexerConfig::TOKENS_METHOD_IS_STATIC const#19683

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-24-feat_parser_add_lexerconfig_tokens_method_is_static_const
Feb 24, 2026
Merged

feat(parser): add LexerConfig::TOKENS_METHOD_IS_STATIC const#19683
graphite-app[bot] merged 1 commit intomainfrom
om/02-24-feat_parser_add_lexerconfig_tokens_method_is_static_const

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 24, 2026

Add a const to LexerConfig trait indicating whether the config is static or runtime. This will be useful optimization in a later PR.

@github-actions github-actions bot added the A-parser Area - Parser label Feb 24, 2026
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Feb 24, 2026
Copy link
Member Author

overlookmotel commented Feb 24, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new compile-time hint to LexerConfig to indicate whether tokens() is type-static vs runtime-dependent, enabling future optimizations in the parser/lexer pipeline.

Changes:

  • Introduce LexerConfig::TOKENS_METHOD_IS_STATIC associated const.
  • Implement the const for the built-in lexer configs (NoTokensLexerConfig, TokensLexerConfig, RuntimeLexerConfig).

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 24, 2026

Merging this PR will not alter performance

✅ 52 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/02-24-feat_parser_add_lexerconfig_tokens_method_is_static_const (462d3c1) with om/02-24-docs_parser_improve_doc_comments_for_parserconfig_and_lexerconfig_ (4e5322b)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel self-assigned this Feb 24, 2026
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 24, 2026
Copy link
Member Author

overlookmotel commented Feb 24, 2026

Merge activity

Add a const to `LexerConfig` trait indicating whether the config is static or runtime. This will be useful optimization in a later PR.
@graphite-app graphite-app bot force-pushed the om/02-24-docs_parser_improve_doc_comments_for_parserconfig_and_lexerconfig_ branch from 4e5322b to 75c9cd8 Compare February 24, 2026 16:06
@graphite-app graphite-app bot force-pushed the om/02-24-feat_parser_add_lexerconfig_tokens_method_is_static_const branch from 462d3c1 to ea6b796 Compare February 24, 2026 16:06
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 24, 2026
Base automatically changed from om/02-24-docs_parser_improve_doc_comments_for_parserconfig_and_lexerconfig_ to main February 24, 2026 16:13
@graphite-app graphite-app bot merged commit ea6b796 into main Feb 24, 2026
23 checks passed
@graphite-app graphite-app bot deleted the om/02-24-feat_parser_add_lexerconfig_tokens_method_is_static_const branch February 24, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants