lib/code_rippa/syntax/tcl.syntax in code_rippa-0.0.7 vs lib/code_rippa/syntax/tcl.syntax in code_rippa-1.0.0

- old
+ new

@@ -1,152 +1,153 @@ ---- +--- name: Tcl -fileTypes: +fileTypes: - tcl scopeName: source.tcl -repository: - escape: +repository: + escape: name: constant.character.escape.tcl - match: \\(\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\n) - bare-string: - endCaptures: - "1": + match: "\\\\(\\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\\n)" + bare-string: + endCaptures: + '1': name: invalid.illegal.tcl - begin: (?:^|(?<=\s))" + begin: "(?:^|(?<=\\s))\"" end: "\"([^\\s\\]]*)" - patterns: + patterns: - include: "#escape" - include: "#variable" comment: matches a single quote-enclosed word without scoping - regexp: - begin: (?=\S)(?![\n;\]]) - end: (?=[\n;\]]) - patterns: + regexp: + begin: "(?=\\S)(?![\\n;\\]])" + end: "(?=[\\n;\\]])" + patterns: - name: string.regexp.tcl - begin: (?=[^ \t\n;]) - end: (?=[ \t\n;]) - patterns: + begin: "(?=[^ \\t\\n;])" + end: "(?=[ \\t\\n;])" + patterns: - include: "#braces" - include: "#bare-string" - include: "#escape" - include: "#variable" - begin: "[ \\t]" - end: (?=[\n;\]]) - patterns: + end: "(?=[\\n;\\]])" + patterns: - include: "#variable" - include: "#embedded" - include: "#escape" - include: "#braces" - include: "#string" comment: swallow the rest of the command - comment: matches a single word, named as a regexp, then swallows the rest of the command - braces: - endCaptures: - "1": + comment: matches a single word, named as a regexp, then swallows the rest of the + command + braces: + endCaptures: + '1': name: invalid.illegal.tcl - begin: (?:^|(?<=\s))\{ - end: \}([^\s\]]*) - patterns: + begin: "(?:^|(?<=\\s))\\{" + end: "\\}([^\\s\\]]*)" + patterns: - name: constant.character.escape.tcl - match: \\[{}\n] + match: "\\\\[{}\\n]" - include: "#inner-braces" comment: matches a single brace-enclosed word - inner-braces: - begin: \{ - end: \} - patterns: + inner-braces: + begin: "\\{" + end: "\\}" + patterns: - name: constant.character.escape.tcl - match: \\[{}\n] + match: "\\\\[{}\\n]" - include: "#inner-braces" comment: matches a nested brace in a brace-enclosed word - variable: + variable: name: variable.other.tcl - captures: - "1": + captures: + '1': name: punctuation.definition.variable.tcl - match: (\$)([a-zA-Z0-9_:]+(\([^\)]+\))?|\{[^\}]*\}) - string: + match: "(\\$)([a-zA-Z0-9_:]+(\\([^\\)]+\\))?|\\{[^\\}]*\\})" + string: name: string.quoted.double.tcl - begin: (?:^|(?<=\s))(?=") + begin: "(?:^|(?<=\\s))(?=\")" applyEndPatternLast: 1 - end: "" - patterns: + end: '' + patterns: - include: "#bare-string" comment: matches a single quote-enclosed word with scoping - embedded: + embedded: name: source.tcl.embedded - endCaptures: - "0": + endCaptures: + '0': name: punctuation.section.embedded.end.tcl - begin: \[ - beginCaptures: - "0": + begin: "\\[" + beginCaptures: + '0': name: punctuation.section.embedded.begin.tcl - end: \] - patterns: + end: "\\]" + patterns: - include: source.tcl uuid: F01F22AC-7CBB-11D9-9B10-000A95E13C98 -foldingStartMarker: \{\s*$ -patterns: -- begin: (?<=^|;)\s*((#)) +foldingStartMarker: "\\{\\s*$" +patterns: +- begin: "(?<=^|;)\\s*((#))" contentName: comment.line.number-sign.tcl - beginCaptures: - "1": + beginCaptures: + '1': name: comment.line.number-sign.tcl - "2": + '2': name: punctuation.definition.comment.tcl - end: \n - patterns: - - match: (\\\\|\\\n) -- captures: - "1": + end: "\\n" + patterns: + - match: "(\\\\\\\\|\\\\\\n)" +- captures: + '1': name: keyword.control.tcl - match: (?<=^|[\[{;])\s*(if|while|for|catch|return|break|continue|switch|exit|foreach)\b -- captures: - "1": + match: "(?<=^|[\\[{;])\\s*(if|while|for|catch|return|break|continue|switch|exit|foreach)\\b" +- captures: + '1': name: keyword.control.tcl - match: (?<=^|})\s*(then|elseif|else)\b -- captures: - "1": + match: "(?<=^|})\\s*(then|elseif|else)\\b" +- captures: + '1': name: keyword.other.tcl - "2": + '2': name: entity.name.function.tcl - match: ^\s*(proc)\s+([^\s]+) -- captures: - "1": + match: "^\\s*(proc)\\s+([^\\s]+)" +- captures: + '1': name: keyword.other.tcl - match: (?<=^|[\[{;])\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 -- begin: (?<=^|[\[{;])\s*(regexp|regsub)\b\s* - beginCaptures: - "1": + match: "(?<=^|[\\[{;])\\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" +- begin: "(?<=^|[\\[{;])\\s*(regexp|regsub)\\b\\s*" + beginCaptures: + '1': name: keyword.other.tcl end: "[\\n;\\]]" - patterns: + patterns: - name: constant.character.escape.tcl - match: \\(?:.|\n) - - match: -\w+\s* + match: "\\\\(?:.|\\n)" + - match: "-\\w+\\s*" comment: switch for regexp - - begin: --\s* + - begin: "--\\s*" applyEndPatternLast: 1 - end: "" - patterns: + end: '' + patterns: - include: "#regexp" comment: end of switches - include: "#regexp" comment: special-case regexp/regsub keyword in order to handle the expression - include: "#escape" - include: "#variable" - name: string.quoted.double.tcl - endCaptures: - "0": + endCaptures: + '0': name: punctuation.definition.string.end.tcl begin: "\"" - beginCaptures: - "0": + beginCaptures: + '0': name: punctuation.definition.string.begin.tcl end: "\"" - patterns: + patterns: - include: "#escape" - include: "#variable" - include: "#embedded" -foldingStopMarker: ^\s*\} -keyEquivalent: ^~T +foldingStopMarker: "^\\s*\\}" +keyEquivalent: "^~T"