Allow dashes in rc.* DOM references - #4197
Merged
djmitche merged 1 commit intoSep 25, 2026
Merged
Conversation
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
djmitche
approved these changes
Sep 25, 2026
djmitche
left a comment
Member
There was a problem hiding this comment.
Looks like a good fix! I guess this might also allow reports containing dashes, e.g., rc.report.my-fun-report.filter=+foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
task _get rc.context.my-ctxfailed with "'rc.context.my-ctx' is not a DOM reference." The lexer'src.<name>DOM rule usedisWord(), 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 likedue-1dlex the same as before.Tested with a new dom2.test.py case for
_get rc.context.my-ctxand lexer_test.cpp cases forrc.context.my-ctx,rc.foo-anddue-1d. Full ctest suite passes.Closes #2219