| 1 |
|
| 2 |
(comment) @comment |
| 3 |
|
| 4 |
(command name: (simple_word) @function) |
| 5 |
|
| 6 |
"proc" @keyword.function |
| 7 |
|
| 8 |
(procedure |
| 9 |
name: (_) @variable |
| 10 |
) |
| 11 |
|
| 12 |
(set (simple_word) @variable) |
| 13 |
|
| 14 |
(argument |
| 15 |
name: (_) @variable.parameter |
| 16 |
) |
| 17 |
|
| 18 |
((simple_word) @variable.builtin |
| 19 |
(#any-of? @variable.builtin |
| 20 |
"argc" |
| 21 |
"argv" |
| 22 |
"argv0" |
| 23 |
"auto_path" |
| 24 |
"env" |
| 25 |
"errorCode" |
| 26 |
"errorInfo" |
| 27 |
"tcl_interactive" |
| 28 |
"tcl_library" |
| 29 |
"tcl_nonwordchars" |
| 30 |
"tcl_patchLevel" |
| 31 |
"tcl_pkgPath" |
| 32 |
"tcl_platform" |
| 33 |
"tcl_precision" |
| 34 |
"tcl_rcFileName" |
| 35 |
"tcl_traceCompile" |
| 36 |
"tcl_traceExec" |
| 37 |
"tcl_wordchars" |
| 38 |
"tcl_version")) |
| 39 |
|
| 40 |
|
| 41 |
"expr" @function.builtin |
| 42 |
|
| 43 |
(command |
| 44 |
name: (simple_word) @function.builtin |
| 45 |
(#any-of? @function.builtin |
| 46 |
"cd" |
| 47 |
"exec" |
| 48 |
"exit" |
| 49 |
"incr" |
| 50 |
"info" |
| 51 |
"join" |
| 52 |
"puts" |
| 53 |
"regexp" |
| 54 |
"regsub" |
| 55 |
"split" |
| 56 |
"subst" |
| 57 |
"trace" |
| 58 |
"source")) |
| 59 |
|
| 60 |
(command name: (simple_word) @keyword |
| 61 |
(#any-of? @keyword |
| 62 |
"append" |
| 63 |
"break" |
| 64 |
"catch" |
| 65 |
"continue" |
| 66 |
"default" |
| 67 |
"dict" |
| 68 |
"error" |
| 69 |
"eval" |
| 70 |
"global" |
| 71 |
"lappend" |
| 72 |
"lassign" |
| 73 |
"lindex" |
| 74 |
"linsert" |
| 75 |
"list" |
| 76 |
"llength" |
| 77 |
"lmap" |
| 78 |
"lrange" |
| 79 |
"lrepeat" |
| 80 |
"lreplace" |
| 81 |
"lreverse" |
| 82 |
"lsearch" |
| 83 |
"lset" |
| 84 |
"lsort" |
| 85 |
"package" |
| 86 |
"return" |
| 87 |
"switch" |
| 88 |
"throw" |
| 89 |
"unset" |
| 90 |
"variable")) |
| 91 |
|
| 92 |
[ |
| 93 |
"error" |
| 94 |
"namespace" |
| 95 |
"on" |
| 96 |
"set" |
| 97 |
"try" |
| 98 |
] @keyword |
| 99 |
|
| 100 |
(unpack) @operator |
| 101 |
|
| 102 |
[ |
| 103 |
"while" |
| 104 |
"foreach" |
| 105 |
|
| 106 |
] @keyword.control.repeat |
| 107 |
|
| 108 |
[ |
| 109 |
"if" |
| 110 |
"else" |
| 111 |
"elseif" |
| 112 |
] @keyword.control.conditional |
| 113 |
|
| 114 |
[ |
| 115 |
"**" |
| 116 |
"/" "*" "%" "+" "-" |
| 117 |
"<<" ">>" |
| 118 |
">" "<" ">=" "<=" |
| 119 |
"==" "!=" |
| 120 |
"eq" "ne" |
| 121 |
"in" "ni" |
| 122 |
"&" |
| 123 |
"^" |
| 124 |
"|" |
| 125 |
"&&" |
| 126 |
"||" |
| 127 |
] @operator |
| 128 |
|
| 129 |
(variable_substitution) @variable |
| 130 |
(quoted_word) @string |
| 131 |
(escaped_character) @constant.character.escape |
| 132 |
|
| 133 |
[ |
| 134 |
"{" "}" |
| 135 |
"[" "]" |
| 136 |
";" |
| 137 |
] @punctuation.delimiter |
| 138 |
|
| 139 |
((simple_word) @constant.numeric |
| 140 |
(#match? @constant.numeric "^[0-9]+$")) |
| 141 |
|
| 142 |
((simple_word) @constant.builtin.boolean |
| 143 |
(#any-of? @constant.builtin.boolean "true" "false")) |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|