Repository navigation
Conversation
Namespaced keywords never matched the default \w+ pattern, so commands such as oo::class were not highlighted.
This branch has not been deployed
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.
Resolves #4560
Changes
The Tcl grammar keyword list stopped at Tcl 8.5, so 8.6 and 9.0 commands such as
try,throw,tailcall,lmap,lpop, and the TclOO commands were not highlighted. Namespaced keywords never matched either, because the default keyword pattern is\w+. That already affectedpkg::createandplatform::shell, and it blocksoo::class,tcl::prefix, andtcl::process.This adds the commands listed in the issue, checked against the Tcl 9.0.4 command index. The keyword pattern is
/(::)?[a-zA-Z_]\w*(::\w+)*/, so a namespaced command matches as one word. Variables still match first, so$ns::varis unchanged. Short generic names (my,self,next,link,const,try) use relevance 0 so they do not skew auto-detection.configureandpropertyare left out, as the issue asked. A markup test covers the new commands, including namespaced forms.Checklist
Assisted-by: Grok 4.7 (high)