diff options
Diffstat (limited to 'runtime/queries/systemtap/highlights.scm')
| -rw-r--r-- | runtime/queries/systemtap/highlights.scm | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/runtime/queries/systemtap/highlights.scm b/runtime/queries/systemtap/highlights.scm new file mode 100644 index 000000000..d1348dc91 --- /dev/null +++ b/runtime/queries/systemtap/highlights.scm @@ -0,0 +1,158 @@ +(identifier) @variable + +(preprocessor_macro_definition + name: (identifier) @function.macro) + +(preprocessor_macro_expansion) @function.macro + +(preprocessor_constant) @constant.macro + +(number) @number + +(string) @string + +(escape_sequence) @string.escape + +[ + (script_argument_string) + (script_argument_number) +] @constant + +(probe_point_component) @function + +(function_definition + name: (identifier) @function) + +(parameter + name: (identifier) @variable.parameter) + +(type) @type.builtin + +(aggregation_operator) @attribute + +(member_expression + member: (identifier) @variable.member) + +(call_expression + function: (identifier) @function.call) + +((call_expression + function: (identifier) @function.builtin) + (#any-of? @function.builtin + "print" "printd" "printdln" "printf" "println" "sprint" "sprintd" "sprintdln" "sprintf" + "sprintln")) + +((identifier) @variable.builtin + (#lua-match? @variable.builtin "^\$+[0-9A-Z_a-z]+\$*$")) + +(shebang_line) @keyword.directive + +(comment) @comment @spell + +[ + "!" + "!=" + "!~" + "$" + "$$" + "%" + "%=" + "&" + "&&" + "&=" + "*" + "*=" + "+" + "++" + "+=" + "-" + "--" + "-=" + "->" + "." + ".=" + "/" + "/=" + ":" + "<" + "<<" + "<<<" + "<<=" + "<=" + "=" + "==" + "=~" + ">" + ">=" + ">>" + ">>=" + "?" + "^" + "^=" + "|" + "|=" + "||" + "~" +] @operator + +[ + "," + (null_statement) +] @punctuation.delimiter + +[ + "%{" + "%}" + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + "delete" + "limit" + "next" + "probe" +] @keyword + +"function" @keyword.function + +"in" @keyword.operator + +"return" @keyword.return + +[ + "if" + "else" +] @keyword.conditional + +[ + "break" + "continue" + "for" + "foreach" + "while" +] @keyword.repeat + +[ + "try" + "catch" +] @keyword.exception + +[ + "%(" + "%)" + "%:" + "%?" + (preprocessor_tokens) + (embedded_code) +] @keyword.directive + +"@define" @keyword.directive.define + +"private" @keyword.modifier + +"global" @keyword.modifier |
