{ "name": "Tcl", "scopeName": "source.tcl", "patterns": [ { "contentName": "comment.line.number-sign.tcl", "begin": "(?\u003c=^|;)\\s*((#))", "end": "\\n", "patterns": [ { "match": "(\\\\\\\\|\\\\\\n)" } ], "beginCaptures": { "1": { "name": "comment.line.number-sign.tcl" }, "2": { "name": "punctuation.definition.comment.tcl" } } }, { "match": "(?\u003c=^|[\\[{;])\\s*(if|while|for|catch|return|break|continue|switch|exit|foreach)\\b", "captures": { "1": { "name": "keyword.control.tcl" } } }, { "match": "(?\u003c=^|})\\s*(then|elseif|else)\\b", "captures": { "1": { "name": "keyword.control.tcl" } } }, { "match": "^\\s*(proc)\\s+([^\\s]+)", "captures": { "1": { "name": "keyword.other.tcl" }, "2": { "name": "entity.name.function.tcl" } } }, { "match": "(?\u003c=^|[\\[{;])\\s*(after|append|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_mkindex_old|auto_qualify|auto_reset|bgerror|binary|cd|clock|close|concat|dde|encoding|eof|error|eval|exec|expr|fblocked|fconfigure|fcopy|file|fileevent|filename|flush|format|gets|glob|global|history|http|incr|info|interp|join|lappend|library|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|memory|msgcat|namespace|open|package|parray|pid|pkg::create|pkg_mkIndex|proc|puts|pwd|re_syntax|read|registry|rename|resource|scan|seek|set|socket|SafeBase|source|split|string|subst|Tcl|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tcltest|tclvars|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait)\\b", "captures": { "1": { "name": "keyword.other.tcl" } } }, { "begin": "(?\u003c=^|[\\[{;])\\s*(regexp|regsub)\\b\\s*", "end": "[\\n;]|(?=\\])", "patterns": [ { "name": "constant.character.escape.tcl", "match": "\\\\(?:.|\\n)" }, { "match": "-\\w+\\s*" }, { "begin": "--\\s*", "patterns": [ { "include": "#regexp" } ], "applyEndPatternLast": true }, { "include": "#regexp" } ], "beginCaptures": { "1": { "name": "keyword.other.tcl" } } }, { "include": "#escape" }, { "include": "#variable" }, { "name": "string.quoted.double.tcl", "begin": "\"", "end": "\"", "patterns": [ { "include": "#escape" }, { "include": "#variable" }, { "include": "#embedded" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tcl" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.tcl" } } } ], "repository": { "bare-string": { "begin": "(?:^|(?\u003c=\\s))\"", "end": "\"([^\\s\\]]*)", "patterns": [ { "include": "#escape" }, { "include": "#variable" } ], "endCaptures": { "1": { "name": "invalid.illegal.tcl" } } }, "braces": { "begin": "(?:^|(?\u003c=\\s))\\{", "end": "\\}([^\\s\\]]*)", "patterns": [ { "name": "constant.character.escape.tcl", "match": "\\\\[{}\\n]" }, { "include": "#inner-braces" } ], "endCaptures": { "1": { "name": "invalid.illegal.tcl" } } }, "embedded": { "name": "source.tcl.embedded", "begin": "\\[", "end": "\\]", "patterns": [ { "include": "source.tcl" } ], "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.tcl" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.tcl" } } }, "escape": { "name": "constant.character.escape.tcl", "match": "\\\\(\\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\\n)" }, "inner-braces": { "begin": "\\{", "end": "\\}", "patterns": [ { "name": "constant.character.escape.tcl", "match": "\\\\[{}\\n]" }, { "include": "#inner-braces" } ] }, "regexp": { "begin": "(?=\\S)(?![\\n;\\]])", "end": "(?=[\\n;\\]])", "patterns": [ { "name": "string.regexp.tcl", "begin": "(?=[^ \\t\\n;])", "end": "(?=[ \\t\\n;])", "patterns": [ { "include": "#braces" }, { "include": "#bare-string" }, { "include": "#escape" }, { "include": "#variable" } ] }, { "begin": "[ \\t]", "end": "(?=[\\n;\\]])", "patterns": [ { "include": "#variable" }, { "include": "#embedded" }, { "include": "#escape" }, { "include": "#braces" }, { "include": "#string" } ] } ] }, "string": { "name": "string.quoted.double.tcl", "begin": "(?:^|(?\u003c=\\s))(?=\")", "patterns": [ { "include": "#bare-string" } ], "applyEndPatternLast": true }, "variable": { "name": "variable.other.tcl", "match": "(\\$)((?:[a-zA-Z0-9_]|::)+(\\([^\\)]+\\))?|\\{[^\\}]*\\})", "captures": { "1": { "name": "punctuation.definition.variable.tcl" } } } } }