| 1 | [ |
| 2 | "use" "no" "require" "package" "class" "role" |
| 3 | ] @keyword.control.import |
| 4 | |
| 5 | [ |
| 6 | "sub" "method" "async" "extended" |
| 7 | ] @keyword.function |
| 8 | |
| 9 | [ |
| 10 | "if" "elsif" "else" "unless" |
| 11 | ] @keyword.control.conditional |
| 12 | |
| 13 | [ |
| 14 | "while" "until" |
| 15 | "for" "foreach" |
| 16 | "do" |
| 17 | ] @keyword.control.repeat |
| 18 | |
| 19 | [ |
| 20 | "my" "our" "local" "state" |
| 21 | ] @keyword.storage.modifier |
| 22 | |
| 23 | [ |
| 24 | "last" "next" "redo" "goto" "return" |
| 25 | ] @keyword.control.return |
| 26 | |
| 27 | [ |
| 28 | "undef" |
| 29 | ] @constant.builtin |
| 30 | |
| 31 | (phaser_statement phase: _ @keyword.directive) |
| 32 | (class_phaser_statement phase: _ @keyword.directive) |
| 33 | |
| 34 | [ |
| 35 | "or" "xor" "and" |
| 36 | "eq" "ne" "cmp" "lt" "le" "ge" "gt" |
| 37 | "isa" |
| 38 | ] @keyword.operator |
| 39 | |
| 40 | (comment) @comment |
| 41 | |
| 42 | (function) @function |
| 43 | |
| 44 | (eof_marker) @keyword.directive |
| 45 | (data_section) @comment |
| 46 | |
| 47 | (number) @constant.numeric |
| 48 | (version) @constant |
| 49 | |
| 50 | (string_literal) @string |
| 51 | (interpolated_string_literal) @string |
| 52 | (quoted_word_list) @string |
| 53 | (command_string) @string |
| 54 | [(heredoc_token) (command_heredoc_token)] @string.special |
| 55 | (heredoc_content) @string |
| 56 | (heredoc_end) @string.special |
| 57 | [(escape_sequence) (escaped_delimiter)] @constant.character.escape |
| 58 | |
| 59 | [(quoted_regexp) (match_regexp)] @string.regexp |
| 60 | |
| 61 | (autoquoted_bareword) @string.special |
| 62 | |
| 63 | [(scalar) (arraylen)] @variable |
| 64 | (scalar_deref_expression ["->" "$" "*"] @variable) |
| 65 | (array) @variable |
| 66 | (array_deref_expression ["->" "@" "*"] @variable) |
| 67 | (hash) @variable |
| 68 | (hash_deref_expression ["->" "%" "*"] @variable) |
| 69 | |
| 70 | (array_element_expression [array:(_) "->" "[" "]"] @variable) |
| 71 | (slice_expression [array:(_) "->" "[" "]"] @variable) |
| 72 | (keyval_expression [array:(_) "->" "[" "]"] @variable) |
| 73 | |
| 74 | (hash_element_expression [hash:(_) "->" "{" "}"] @variable) |
| 75 | (slice_expression [hash:(_) "->" "[" "]"] @variable) |
| 76 | (keyval_expression [hash:(_) "->" "[" "]"] @variable) |
| 77 | |
| 78 | (hash_element_expression key: (bareword) @string.special) |
| 79 | |
| 80 | (use_statement (package) @type) |
| 81 | (package_statement (package) @type) |
| 82 | (require_expression (bareword) @type) |
| 83 | |
| 84 | (subroutine_declaration_statement name: (_) @function) |
| 85 | (attrlist (attribute) @attribute) |
| 86 | |
| 87 | (goto_expression (label) @label) |
| 88 | (loopex_expression (label) @label) |
| 89 | |
| 90 | (statement_label label: _ @label) |
| 91 | |
| 92 | (relational_expression operator: "isa" right: (bareword) @type) |
| 93 | |
| 94 | (function_call_expression (function) @function) |
| 95 | (method_call_expression (method) @function.method) |
| 96 | (method_call_expression invocant: (bareword) @type) |
| 97 | |
| 98 | (func0op_call_expression function: _ @function.builtin) |
| 99 | (func1op_call_expression function: _ @function.builtin) |