Skip to content

Allow dashes in rc.* DOM references - #4197

Merged
djmitche merged 1 commit into
GothenburgBitFactory:developfrom
RayanR000:fix/2219-dom-rc-dash
Sep 25, 2026
Merged

djmitche merged 1 commit into
GothenburgBitFactory:developfrom
RayanR000:fix/2219-dom-rc-dash

Conversation

@RayanR000

Copy link
Copy Markdown
Contributor

task _get rc.context.my-ctx failed with "'rc.context.my-ctx' is not a DOM reference." The lexer's rc.<name> DOM rule used isWord(), which stops at operator characters, so the token ended at the dash and the whole argument fell back to being a plain word.

This keeps consuming the name while a dash is followed by more of it. Only tokens starting with rc. are affected; a trailing dash is still lexed as an operator, and expressions like due-1d lex the same as before.

Tested with a new dom2.test.py case for _get rc.context.my-ctx and lexer_test.cpp cases for rc.context.my-ctx, rc.foo- and due-1d. Full ctest suite passes.

Closes #2219

The lexer stopped an rc.<name> DOM reference at the first '-', so
`task _get rc.context.my-ctx` treated the argument as a plain word and
failed with "is not a DOM reference". Keep consuming the name while a
dash is followed by more of it. A trailing dash is still an operator.

Closes GothenburgBitFactory#2219
Copilot AI lite review requested due to automatic review settings September 23, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@djmitche djmitche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a good fix! I guess this might also allow reports containing dashes, e.g., rc.report.my-fun-report.filter=+foo

@djmitche
djmitche merged commit 5fe0902 into GothenburgBitFactory:develop Sep 25, 2026
16 checks passed
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.

_get rc.context.<context with dash> fails

3 participants