|
| 1 | +;; data.aws_iam_policy_document.cluster_assume_role_policy.json |
| 2 | +(expression |
| 3 | + ((variable_expr (identifier)) @keyword |
| 4 | + (.eq? @keyword "data")) |
| 5 | + . (get_attr (identifier) @type) |
| 6 | + . (get_attr (identifier) @function.call) |
| 7 | + . (get_attr (identifier) @property)? |
| 8 | + ) |
| 9 | + |
| 10 | +;; module.path |
| 11 | +((expression |
| 12 | + ((variable_expr (identifier)) @keyword |
| 13 | + (.eq? @keyword "module")) |
| 14 | + . (get_attr) @type |
| 15 | + )) |
| 16 | + |
| 17 | +((expression |
| 18 | + ((variable_expr (identifier)) @keyword |
| 19 | + (.match? @keyword "^(var|local|count|each|path)$")) |
| 20 | + . (get_attr)? @property |
| 21 | + )) |
| 22 | + |
| 23 | +;; aws_iam_role.shared-sagemaker-execution.name |
| 24 | +(expression |
| 25 | + (variable_expr (identifier)) @type |
| 26 | + . (get_attr) @function.call |
| 27 | + . (get_attr)? @property |
| 28 | + .) |
| 29 | + |
| 30 | +;; TODO: Highlight `content'. |
| 31 | +((block (identifier) @keyword |
| 32 | + [(string_lit (quoted_template_start) @noise |
| 33 | + (template_literal) @variable |
| 34 | + (quoted_template_end) @noise)]) |
| 35 | + (.eq? @keyword "dynamic")) |
| 36 | + |
| 37 | +;; ((block (identifier) @keyword |
| 38 | +;; [(string_lit (template_literal) @variable)] |
| 39 | +;; (body ((attribute (identifier) @keyword) |
| 40 | +;; (.eq? @keyword "for_each")))) |
| 41 | +;; (.eq? @keyword "dynamic")) |
| 42 | + |
| 43 | +((block (identifier) @keyword |
| 44 | + . [(string_lit (quoted_template_start) @noise |
| 45 | + (template_literal) @function |
| 46 | + (quoted_template_end) @noise) |
| 47 | + (identifier) @function]) |
| 48 | + (.eq? @keyword "output")) |
| 49 | + |
| 50 | +((block (identifier) @keyword |
| 51 | + [(string_lit (quoted_template_start) @noise |
| 52 | + (template_literal) @variable.special |
| 53 | + (quoted_template_end) @noise) |
| 54 | + (identifier) @variable.special]) |
| 55 | + (.eq? @keyword "variable")) |
| 56 | + |
| 57 | +((block (identifier) @keyword |
| 58 | + [(string_lit (quoted_template_start) @noise |
| 59 | + (template_literal) @type |
| 60 | + (quoted_template_end) @noise) |
| 61 | + (identifier) @type]) |
| 62 | + (.eq? @keyword "module")) |
| 63 | + |
| 64 | +;; resource "aws_launch_template" "default" |
| 65 | +(block (identifier) |
| 66 | + [(string_lit (quoted_template_start) @noise |
| 67 | + (template_literal) @type |
| 68 | + (quoted_template_end) @noise) |
| 69 | + (identifier) @type] |
| 70 | + . [(string_lit (quoted_template_start) @noise |
| 71 | + (template_literal) @function |
| 72 | + (quoted_template_end) @noise) |
| 73 | + (identifier) @function] |
| 74 | + . (block_start)) |
| 75 | + |
| 76 | +((block (identifier) @keyword) |
| 77 | + (.match? @keyword "(resource|data|output|locals|lifecycle)")) |
| 78 | + |
| 79 | +((attribute (identifier) @keyword) |
| 80 | + (.match? @keyword "^(count|depends_on|for_each)$")) |
| 81 | + |
| 82 | +(attribute (identifier) @variable) |
| 83 | +(object_elem key: (_) @variable) |
| 84 | + |
| 85 | +(block (identifier) @label . (block_start)) |
0 commit comments