helix-mirror/runtime/queries/perl/highlights.scm

99 lines
2.2 KiB
Scheme
Raw Normal View History

2021-11-08 05:05:12 +04:00
[
"use" "no" "require" "package"
] @keyword.control.import
2021-11-08 05:05:12 +04:00
[
"sub"
] @keyword.function
2021-11-08 05:05:12 +04:00
[
"if" "elsif" "else" "unless"
] @keyword.control.conditional
2021-11-08 05:05:12 +04:00
[
"while" "until"
"for" "foreach"
"do"
] @keyword.control.repeat
2021-11-08 05:05:12 +04:00
[
"my" "our" "local"
] @keyword.storage.modifier
2021-11-08 05:05:12 +04:00
[
"last" "next" "redo" "goto" "return"
] @keyword.control.return
2021-11-08 05:05:12 +04:00
[
"undef"
] @constant.builtin
2021-11-08 05:05:12 +04:00
(phaser_statement phase: _ @keyword.directive)
2021-11-08 05:05:12 +04:00
[
"or" "and"
"eq" "ne" "cmp" "lt" "le" "ge" "gt"
"isa"
] @keyword.operator
2021-11-08 05:05:12 +04:00
(comment) @comment
2021-11-08 05:05:12 +04:00
(eof_marker) @keyword.directive
(data_section) @comment
2021-11-08 05:05:12 +04:00
(number) @constant.numeric
(version) @constant
2021-11-08 05:05:12 +04:00
(string_literal) @string
(interpolated_string_literal) @string
(quoted_word_list) @string
(command_string) @string
[(heredoc_token) (command_heredoc_token)] @string.special
(heredoc_content) @string
(heredoc_end) @string.special
[(escape_sequence) (escaped_delimiter)] @constant.character.escape
2021-11-08 05:05:12 +04:00
[(quoted_regexp) (match_regexp)] @string.regexp
(autoquoted_bareword _?) @string.special
[(scalar) (arraylen)] @variable
(scalar_deref_expression ["->" "$" "*"] @variable)
(array) @variable
(array_deref_expression ["->" "@" "*"] @variable)
(hash) @variable
(hash_deref_expression ["->" "%" "*"] @variable)
(array_element_expression [array:(_) "->" "[" "]"] @variable)
(slice_expression [array:(_) "->" "[" "]"] @variable)
(keyval_expression [array:(_) "->" "[" "]"] @variable)
(hash_element_expression [hash:(_) "->" "{" "}"] @variable)
(slice_expression [hash:(_) "->" "[" "]"] @variable)
(keyval_expression [hash:(_) "->" "[" "]"] @variable)
(hash_element_expression key: (bareword) @string.special)
(use_statement (package) @type)
(package_statement (package) @type)
(require_expression (bareword) @type)
(subroutine_declaration_statement name: (_) @function)
(attrlist (attribute) @attribute)
(goto_expression (label) @label)
(loopex_expression (label) @label)
(statement_label label: _ @label)
2021-11-08 05:05:12 +04:00
(relational_expression operator: "isa" right: (bareword) @type)
2021-11-08 05:05:12 +04:00
(function_call_expression (function) @function)
(method_call_expression (method) @function.method)
(method_call_expression invocant: (bareword) @type)
2021-11-08 05:05:12 +04:00
(func0op_call_expression function: _ @function.builtin)
(func1op_call_expression function: _ @function.builtin)
2021-11-08 05:05:12 +04:00
(function) @function