Merge pull request 'def_tcl_syntax' (#6) from def_tcl_syntax into main

Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
2025-01-24 22:25:12 +00:00
4 changed files with 1081 additions and 0 deletions
+16
View File
@@ -22,6 +22,17 @@
],
"contributes": {
"languages": [
{
"id": "tcl",
"aliases": [
"NX TCL",
"tcl"
],
"extensions": [
".tcl"
],
"configuration": "./language-configuration.json"
},
{
"id": "cdl",
"aliases": [
@@ -46,6 +57,11 @@
}
],
"grammars": [
{
"language": "tcl",
"scopeName": "source.tcl",
"path": "./syntaxes/tcl.tmLanguage.json"
},
{
"language": "cdl",
"scopeName": "source.cdl",
+424
View File
@@ -0,0 +1,424 @@
{
"fileTypes": [
"tcl"
],
"name": "tcl",
"patterns": [
{
"include": "#main"
}
],
"scopeName": "source.tcl",
"repository": {
"main": {
"patterns": [
{
"include": "#command"
}
]
},
"args": {
"patterns": [
{
"include": "#quoted_args"
},
{
"include": "#numeric"
},
{
"match": "((?<=;)\\s*#.*$)",
"name": "comment.tcl",
"comment": "Inline comments."
}
]
},
"braced": {
"patterns": [
{
"begin": "((?<!\\\\)\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.tcl"
}
},
"patterns": [
{
"include": "#braced__1"
}
],
"end": "(\\}([^\\s\\]]*))",
"endCaptures": {
"1": {
"name": "punctuation.tcl"
}
}
}
]
},
"braced__1": {
"patterns": [
{
"match": "(\\\\(?:\\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))",
"name": "constant.character.escape.tcl"
},
{
"include": "#keywords"
},
{
"match": "((?<={)\\s*(?:after|append|apply|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_qualify|auto_reset|bgerror|binary|break|catch|cd|chan|clock|close|concat|continue|coroutine|dde|dict|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|fileevent|file|flush|foreach|for|format|gets|global|glob|history|http|if|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|lmap|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|memory|my|namespace|nextto|next|oo::class|oo::copy|oo::define|oo::objdefine|oo::object|open|package|parray|pid|pkg::create|pkg_mkIndex|platform::shell|proc|puts|pwd|read|regexp|registry|regsub|rename|return|scan|seek|self|set|socket|source|split|string|subst|switch|tailcall|tcl::prefix|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tell|throw|time|trace|try|unknown|unload|unset|update|uplevel|upvar|variable|vwait|while|yieldto|yield)\\s+)",
"name": "keyword.tcl",
"comment": "Special handling for known commands."
},
{
"include": "#braced_inner"
},
{
"include": "#args"
}
]
},
"braced_inner": {
"patterns": [
{
"begin": "(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.tcl"
}
},
"patterns": [
{
"include": "#braced_inner__1"
}
],
"end": "(\\})",
"endCaptures": {
"1": {
"name": "punctuation.tcl"
}
}
}
]
},
"braced_inner__1": {
"patterns": [
{
"match": "(\\\\[\\x{007b}\\x{007d}])",
"name": "constant.character.escape.tcl"
},
{
"include": "#numeric"
},
{
"include": "#braced_inner"
},
{
"include": "#args"
}
]
},
"braced_lit": {
"patterns": [
{
"match": "((?:(?<!\\\\){)(?:[^\\x{007b}\\x{007d}\\n]*(?:\\g<1>(?:\\\\{|\\\\}|[^\\x{007b}\\x{007d}])*)*)})",
"name": "none.tcl",
"comment": "Handle braced literal."
}
]
},
"braced_lit_re": {
"patterns": [
{
"match": "((?:(?<!\\\\){)(?:[^\\x{007b}\\x{007d}\\n]*(?:\\g<1>(?:\\\\{|\\\\}|[^\\x{007b}\\x{007d}])*)*)})",
"name": "string.regexp.tcl",
"comment": "Handle braced regex pattern."
}
]
},
"command": {
"patterns": [
{
"begin": "(\\\\\\s*$)",
"beginCaptures": {
"1": {
"name": "constant.character.escape.tcl"
}
},
"patterns": [
{
"include": "#command__1"
}
],
"end": "((?<!\\\\\\s)$)",
"endCaptures": {
"1": {
"name": "none.tcl"
}
}
},
{
"match": "(^\\s*#.*)",
"name": "comment.tcl",
"comment": "Line comments."
},
{
"match": "(\\{\\s*$|^\\s*\\})",
"name": "punctuation.tcl",
"comment": "Leading/trailing curly braces."
},
{
"match": "(?<=^|{)(\\s*proc\\s+)(\\S+\\s+)((?:(?<!\\\\){)(?:[^\\x{007b}\\x{007d}\\n]*(?:\\g<1>(?:\\\\{|\\\\}|[^\\x{007b}\\x{007d}])*)*)})",
"captures": {
"1": {
"name": "keyword.tcl"
},
"2": {
"name": "entity.name.function.tcl"
},
"3": {
"name": "none.tcl"
}
},
"comment": "Proc command."
},
{
"include": "#regexp"
},
{
"include": "#keywords"
},
{
"match": "(^\\s*\\S+|(?:(?<=[^\\x{005c}]\\[)[^\\s\\]]++(?!\\])))",
"name": "keyword.tcl",
"comment": "All other commands. (NOTE: Iro doesn't support possessive quantifiers, but the grammar does; be sure to replace the second + with ++ after regenerating!)"
},
{
"include": "#args"
}
]
},
"command__1": {
"patterns": [
{
"include": "#keywords"
},
{
"include": "#args"
}
]
},
"embedded": {
"patterns": [
{
"begin": "((?<!\\\\)\\[)",
"beginCaptures": {
"1": {
"name": "punctuation.tcl"
}
},
"patterns": [
{
"include": "#embedded__1"
}
],
"end": "((?<!\\\\)\\])",
"endCaptures": {
"1": {
"name": "punctuation.tcl"
}
}
}
]
},
"embedded__1": {
"patterns": [
{
"include": "#command"
}
]
},
"keywords": {
"patterns": [
{
"match": "((?<=^|[\\[\\x{007b}\\x{003b}])\\s*(break|catch|continue|default|error|exit|foreach|for|if|return|switch|throw|try|while)\\b)",
"name": "keyword.control.tcl",
"comment": "Keywords."
},
{
"match": "((?<=^|})\\s*(then|elseif|else)\\b)",
"name": "keyword.control.tcl",
"comment": "Inline keywords."
}
]
},
"numeric": {
"patterns": [
{
"match": "((?:\\b|[\\+\\-\\.])(?:0b[01]+|0o[0-7]+|0x[0-9a-fA-F]+|(?:\\d*\\.\\d+(?:[Ee][-\\x{002b}]?\\d+)?)|(?:\\d+\\.?[Ee][-\\x{002b}]?\\d+)|\\d+|[Ii][Nn][Ff]|[Nn][Aa][Nn])\\b)",
"name": "constant.numeric.tcl"
}
]
},
"quoted": {
"patterns": [
{
"begin": "((?<!\\\\)\")",
"beginCaptures": {
"1": {
"name": "string.tcl"
}
},
"patterns": [
{
"include": "#quoted__1"
}
],
"end": "(\")",
"endCaptures": {
"1": {
"name": "string.tcl"
}
}
}
]
},
"quoted__1": {
"patterns": [
{
"include": "#quoted_args"
},
{
"match": "([^\\x{0024}\\x{005b}\\x{0022}\\x{005c}]+)",
"name": "string.tcl"
}
]
},
"quoted_args": {
"patterns": [
{
"include": "#braced"
},
{
"include": "#quoted"
},
{
"include": "#embedded"
},
{
"match": "(\\\\(?:\\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))",
"name": "constant.character.escape.tcl"
},
{
"include": "#variable"
}
]
},
"regexp": {
"patterns": [
{
"begin": "((?<=^|[\\[\\x{007b}\\x{003b}])\\s*(?:regexp|regsub)\\s+)((?:(?:(?:-about|-all|-expanded|-indices|-inline|-lineanchor|-linestop|-line|-nocase|(?:-index\\s+(?:end|\\d+)(?:[\\+\\-]-?\\d+)?))\\s+)*(?:--\\s+)?)?)",
"beginCaptures": {
"1": {
"name": "keyword.tcl"
},
"2": {
"name": "none.tcl"
}
},
"patterns": [
{
"include": "#regexp__1"
}
],
"end": "(\\s+)",
"endCaptures": {
"1": {
"name": "none.tcl"
}
}
},
{
"include": "#args"
}
]
},
"regexp__1": {
"patterns": [
{
"include": "#braced_lit_re"
},
{
"begin": "((?:(?<!\\\\)\"))",
"beginCaptures": {
"1": {
"name": "string.regexp.tcl"
}
},
"patterns": [
{
"include": "#regexp__2"
}
],
"end": "((?:(?<!\\\\)\"))",
"endCaptures": {
"1": {
"name": "string.regexp.tcl"
}
}
},
{
"include": "#variable"
},
{
"match": "(\\S+)",
"name": "string.regexp.tcl",
"comment": "Handle bare regex pattern."
}
]
},
"regexp__2": {
"patterns": [
{
"include": "#braced_lit_re"
},
{
"include": "#embedded"
},
{
"include": "#variable"
},
{
"match": "(\\\\\"|[^\\x{0022}])",
"name": "string.regexp.tcl",
"comment": "All other quoted text."
}
]
},
"variable": {
"patterns": [
{
"match": "(\\$(?:(?:[a-zA-Z0-9_]|::)+(?:\\([^\\)]+\\))?|\\{(?:[^\\}]*|[^\\}\\x{0028}]+\\([^\\}\\x{0029}]+\\))\\}))",
"name": "variable.tcl"
}
]
},
"word_lit__1": {
"patterns": [
{
"include": "#braced_lit"
},
{
"include": "#embedded"
},
{
"include": "#variable"
},
{
"match": "(\\\\\"|[^\\x{0022}])",
"name": "string.tcl",
"comment": "All other quoted text."
}
]
}
}
}
+638
View File
@@ -0,0 +1,638 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- Generated via Iro -->
<dict>
<key>fileTypes</key>
<array>
<string>tcl</string>
</array>
<key>name</key>
<string>tcl</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#main</string>
</dict>
</array>
<key>scopeName</key>
<string>source.tcl</string>
<key>uuid</key>
<string>c7017136-2ff2-48e9-bdb0-570cf238b4a2</string>
<key>repository</key>
<dict>
<key>main</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#command</string>
</dict>
</array>
</dict>
<key>args</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#quoted_args</string>
</dict>
<dict>
<key>include</key>
<string>#numeric</string>
</dict>
<dict>
<key>match</key>
<string>((?&lt;=;)\s*#.*$)</string>
<key>name</key>
<string>comment.tcl</string>
<key>comment</key>
<string>Inline comments.</string>
</dict>
</array>
</dict>
<key>braced</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>((?&lt;!\\)\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced__1</string>
</dict>
</array>
<key>end</key>
<string>(\}([^\s\]]*))</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>braced__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(\\(?:\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))</string>
<key>name</key>
<string>constant.character.escape.tcl</string>
</dict>
<dict>
<key>include</key>
<string>#keywords</string>
</dict>
<dict>
<key>match</key>
<string>((?&lt;={)\s*(?:after|append|apply|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_qualify|auto_reset|bgerror|binary|break|catch|cd|chan|clock|close|concat|continue|coroutine|dde|dict|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|fileevent|file|flush|foreach|for|format|gets|global|glob|history|http|if|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|lmap|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|memory|my|namespace|nextto|next|oo::class|oo::copy|oo::define|oo::objdefine|oo::object|open|package|parray|pid|pkg::create|pkg_mkIndex|platform::shell|proc|puts|pwd|read|regexp|registry|regsub|rename|return|scan|seek|self|set|socket|source|split|string|subst|switch|tailcall|tcl::prefix|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tell|throw|time|trace|try|unknown|unload|unset|update|uplevel|upvar|variable|vwait|while|yieldto|yield)\s+)</string>
<key>name</key>
<string>keyword.tcl</string>
<key>comment</key>
<string>Special handling for known commands.</string>
</dict>
<dict>
<key>include</key>
<string>#braced_inner</string>
</dict>
<dict>
<key>include</key>
<string>#args</string>
</dict>
</array>
</dict>
<key>braced_inner</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced_inner__1</string>
</dict>
</array>
<key>end</key>
<string>(\})</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>braced_inner__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(\\[\x{007b}\x{007d}])</string>
<key>name</key>
<string>constant.character.escape.tcl</string>
</dict>
<dict>
<key>include</key>
<string>#numeric</string>
</dict>
<dict>
<key>include</key>
<string>#braced_inner</string>
</dict>
<dict>
<key>include</key>
<string>#args</string>
</dict>
</array>
</dict>
<key>braced_lit</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>((?:(?&lt;!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g&lt;1&gt;(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
<key>name</key>
<string>none.tcl</string>
<key>comment</key>
<string>Handle braced literal.</string>
</dict>
</array>
</dict>
<key>braced_lit_re</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>((?:(?&lt;!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g&lt;1&gt;(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
<key>name</key>
<string>string.regexp.tcl</string>
<key>comment</key>
<string>Handle braced regex pattern.</string>
</dict>
</array>
</dict>
<key>command</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(\\\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.character.escape.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#command__1</string>
</dict>
</array>
<key>end</key>
<string>((?&lt;!\\\s)$)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>none.tcl</string>
</dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>(^\s*#.*)</string>
<key>name</key>
<string>comment.tcl</string>
<key>comment</key>
<string>Line comments.</string>
</dict>
<dict>
<key>match</key>
<string>(\{\s*$|^\s*\})</string>
<key>name</key>
<string>punctuation.tcl</string>
<key>comment</key>
<string>Leading/trailing curly braces.</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;=^|{)(\s*proc\s+)(\S+\s+)((?:(?&lt;!\\){)(?:[^\x{007b}\x{007d}\n]*(?:\g&lt;1&gt;(?:\\{|\\}|[^\x{007b}\x{007d}])*)*)})</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.tcl</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.tcl</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>none.tcl</string>
</dict>
</dict>
<key>comment</key>
<string>Proc command.</string>
</dict>
<dict>
<key>include</key>
<string>#regexp</string>
</dict>
<dict>
<key>include</key>
<string>#keywords</string>
</dict>
<dict>
<key>match</key>
<string>(^\s*\S+|(?:(?&lt;=[^\x{005c}]\[)[^\s\]]++(?!\])))</string>
<key>name</key>
<string>keyword.tcl</string>
<key>comment</key>
<string>All other commands. (NOTE: Iro doesn&apos;t support possessive quantifiers, but the grammar does; be sure to replace the second + with ++ after regenerating!)</string>
</dict>
<dict>
<key>include</key>
<string>#args</string>
</dict>
</array>
</dict>
<key>command__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#keywords</string>
</dict>
<dict>
<key>include</key>
<string>#args</string>
</dict>
</array>
</dict>
<key>embedded</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>((?&lt;!\\)\[)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#embedded__1</string>
</dict>
</array>
<key>end</key>
<string>((?&lt;!\\)\])</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.tcl</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>embedded__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#command</string>
</dict>
</array>
</dict>
<key>keywords</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>((?&lt;=^|[\[\x{007b}\x{003b}])\s*(break|catch|continue|default|error|exit|foreach|for|if|return|switch|throw|try|while)\b)</string>
<key>name</key>
<string>keyword.control.tcl</string>
<key>comment</key>
<string>Keywords.</string>
</dict>
<dict>
<key>match</key>
<string>((?&lt;=^|})\s*(then|elseif|else)\b)</string>
<key>name</key>
<string>keyword.control.tcl</string>
<key>comment</key>
<string>Inline keywords.</string>
</dict>
</array>
</dict>
<key>numeric</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>((?:\b|[\+\-\.])(?:0b[01]+|0o[0-7]+|0x[0-9a-fA-F]+|(?:\d*\.\d+(?:[Ee][-\x{002b}]?\d+)?)|(?:\d+\.?[Ee][-\x{002b}]?\d+)|\d+|[Ii][Nn][Ff]|[Nn][Aa][Nn])\b)</string>
<key>name</key>
<string>constant.numeric.tcl</string>
</dict>
</array>
</dict>
<key>quoted</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>((?&lt;!\\)&quot;)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>string.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#quoted__1</string>
</dict>
</array>
<key>end</key>
<string>(&quot;)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>string.tcl</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>quoted__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#quoted_args</string>
</dict>
<dict>
<key>match</key>
<string>([^\x{0024}\x{005b}\x{0022}\x{005c}]+)</string>
<key>name</key>
<string>string.tcl</string>
</dict>
</array>
</dict>
<key>quoted_args</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced</string>
</dict>
<dict>
<key>include</key>
<string>#quoted</string>
</dict>
<dict>
<key>include</key>
<string>#embedded</string>
</dict>
<dict>
<key>match</key>
<string>(\\(?:\d{1,3}|x[a-fA-F0-9]{1,2}|u[a-fA-F0-9]{1,4}|U[a-fA-F0-9]{1,8}|.))</string>
<key>name</key>
<string>constant.character.escape.tcl</string>
</dict>
<dict>
<key>include</key>
<string>#variable</string>
</dict>
</array>
</dict>
<key>regexp</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>((?&lt;=^|[\[\x{007b}\x{003b}])\s*(?:regexp|regsub)\s+)((?:(?:(?:-about|-all|-expanded|-indices|-inline|-lineanchor|-linestop|-line|-nocase|(?:-index\s+(?:end|\d+)(?:[\+\-]-?\d+)?))\s+)*(?:--\s+)?)?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.tcl</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>none.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp__1</string>
</dict>
</array>
<key>end</key>
<string>(\s+)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>none.tcl</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#args</string>
</dict>
</array>
</dict>
<key>regexp__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced_lit_re</string>
</dict>
<dict>
<key>begin</key>
<string>((?:(?&lt;!\\)&quot;))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>string.regexp.tcl</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp__2</string>
</dict>
</array>
<key>end</key>
<string>((?:(?&lt;!\\)&quot;))</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>string.regexp.tcl</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#variable</string>
</dict>
<dict>
<key>match</key>
<string>(\S+)</string>
<key>name</key>
<string>string.regexp.tcl</string>
<key>comment</key>
<string>Handle bare regex pattern.</string>
</dict>
</array>
</dict>
<key>regexp__2</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced_lit_re</string>
</dict>
<dict>
<key>include</key>
<string>#embedded</string>
</dict>
<dict>
<key>include</key>
<string>#variable</string>
</dict>
<dict>
<key>match</key>
<string>(\\&quot;|[^\x{0022}])</string>
<key>name</key>
<string>string.regexp.tcl</string>
<key>comment</key>
<string>All other quoted text.</string>
</dict>
</array>
</dict>
<key>variable</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(\$(?:(?:[a-zA-Z0-9_]|::)+(?:\([^\)]+\))?|\{(?:[^\}]*|[^\}\x{0028}]+\([^\}\x{0029}]+\))\}))</string>
<key>name</key>
<string>variable.tcl</string>
</dict>
</array>
</dict>
<key>word_lit__1</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braced_lit</string>
</dict>
<dict>
<key>include</key>
<string>#embedded</string>
</dict>
<dict>
<key>include</key>
<string>#variable</string>
</dict>
<dict>
<key>match</key>
<string>(\\&quot;|[^\x{0022}])</string>
<key>name</key>
<string>string.tcl</string>
<key>comment</key>
<string>All other quoted text.</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
+3
View File
@@ -0,0 +1,3 @@
proc myProc {arg {opt 1}} {
}