| 1 | (string_array "," @punctuation.delimiter) |
| 2 | (string_array ["[" "]"] @punctuation.bracket) |
| 3 | |
| 4 | [ |
| 5 | "ARG" |
| 6 | "AS LOCAL" |
| 7 | "BUILD" |
| 8 | "CACHE" |
| 9 | "CMD" |
| 10 | "COPY" |
| 11 | "DO" |
| 12 | "ENTRYPOINT" |
| 13 | "ENV" |
| 14 | "EXPOSE" |
| 15 | "FROM DOCKERFILE" |
| 16 | "FROM" |
| 17 | "FUNCTION" |
| 18 | "GIT CLONE" |
| 19 | "HOST" |
| 20 | "IMPORT" |
| 21 | "LABEL" |
| 22 | "LET" |
| 23 | "PROJECT" |
| 24 | "RUN" |
| 25 | "SAVE ARTIFACT" |
| 26 | "SAVE IMAGE" |
| 27 | "SET" |
| 28 | "USER" |
| 29 | "VERSION" |
| 30 | "VOLUME" |
| 31 | "WORKDIR" |
| 32 | ] @keyword |
| 33 | |
| 34 | (for_command ["FOR" "IN" "END"] @keyword.control.repeat) |
| 35 | |
| 36 | (if_command ["IF" "END"] @keyword.control.conditional) |
| 37 | (elif_block ["ELSE IF"] @keyword.control.conditional) |
| 38 | (else_block ["ELSE"] @keyword.control.conditional) |
| 39 | |
| 40 | (import_command ["IMPORT" "AS"] @keyword.control.import) |
| 41 | |
| 42 | (try_command ["TRY" "FINALLY" "END"] @keyword.control.exception) |
| 43 | |
| 44 | (wait_command ["WAIT" "END"] @keyword.control) |
| 45 | (with_docker_command ["WITH DOCKER" "END"] @keyword.control) |
| 46 | |
| 47 | [ |
| 48 | (comment) |
| 49 | (line_continuation_comment) |
| 50 | ] @comment |
| 51 | |
| 52 | (line_continuation) @operator |
| 53 | |
| 54 | [ |
| 55 | (target_ref) |
| 56 | (target_artifact) |
| 57 | (function_ref) |
| 58 | ] @function |
| 59 | |
| 60 | (target (identifier) @function) |
| 61 | |
| 62 | [ |
| 63 | (double_quoted_string) |
| 64 | (single_quoted_string) |
| 65 | ] @string |
| 66 | (unquoted_string) @string.special |
| 67 | (escape_sequence) @constant.character.escape |
| 68 | |
| 69 | (variable) @variable |
| 70 | (expansion ["$" "{" "}" "(" ")"] @punctuation.special) |
| 71 | (build_arg) @variable |
| 72 | (options (_) @variable.parameter) |
| 73 | |
| 74 | "=" @operator |