|
| 1 | +[(code_comment) (layout_comment)] @comment.block |
| 2 | + |
| 3 | +(do_decl "do" @keyword.control) |
| 4 | +(val_decl "val" @keyword.storage.type) |
| 5 | +(fun_decl ["fun" "and"] @keyword.storage.type) |
| 6 | +(datatype_decl ["datatype" "and"] @keyword.storage.type) |
| 7 | +(datatype_arm "of" @keyword.storage.type) |
| 8 | +(object_decl ["object" "of"] @keyword.storage.type) |
| 9 | +(type_decl "type" @keyword.storage.type) |
| 10 | +(local_decl ["local" "in" "end"] @keyword.storage.modifier) |
| 11 | +(open_decl "open" @keyword.control) |
| 12 | +(import_decl "import" @keyword.control.import) |
| 13 | +(with_expr ["with" "without"] @keyword.operator) |
| 14 | +(orelse_expr ["orelse" "otherwise"] @keyword.operator) |
| 15 | +(andalso_expr ["andalso" "andthen"] @keyword.operator) |
| 16 | +(fn_expr ["fn" "as"] @keyword.function) |
| 17 | +(if_expr ["if" "then" "else"] @keyword.control.conditional) |
| 18 | +(case_expr ["case" "of"] @keyword.control) |
| 19 | +(fail_expr "fail" @keyword.control) |
| 20 | +(let_expr ["let" "in" "end"] @keyword.storage.modifier) |
| 21 | +(pat "as" @keyword.operator) |
| 22 | + |
| 23 | +(boolean_lit) @constant.builtin.boolean |
| 24 | +(numeric_lit) @constant.numeric.integer |
| 25 | +(float_lit) @constant.numeric.float |
| 26 | +(string_lit) @string.quoted.double |
| 27 | +(backslash_escape) @constant.character.escape |
| 28 | + |
| 29 | +["=" ":" ","] @punctuation.delimiter |
| 30 | +["->" "=>"] @operator |
| 31 | +["(" ")" "[" "]" "{" "}"] @punctuation.bracket |
| 32 | + |
| 33 | +[(ident) (label)] @variable.other |
| 34 | +(type_ident) @type |
| 35 | +(atomic_pat (ident) @variable.other) |
| 36 | +(pat (app_pat (atomic_pat (ident) @variable.parameter))) |
| 37 | + |
| 38 | +(type_var) @type.parameter |
| 39 | +(atomic_type (type_ident) @type.builtin) |
| 40 | +[(record_type) (product_type) (app_type) (arrow_type)] @type |
| 41 | + |
| 42 | +(atomic_expr (ident) @variable.other) |
| 43 | +(project_expr) @variable.member |
| 44 | +(field_binding (label) @variable.member.private) |
| 45 | +(field_binding (expr) @variable.other) |
| 46 | +(record_pat (ident) @variable.member.private) |
| 47 | + |
| 48 | +(app_expr |
| 49 | + (app_expr (atomic_expr (ident) @function.call)) |
| 50 | + (atomic_expr)) |
| 51 | +(app_expr |
| 52 | + _ |
| 53 | + [":=" "@" "::" "o" "==" "!=" "==." "!=." |
| 54 | + "<" "<=" ">" ">=" "<." "<=." ">." ">=." |
| 55 | + "+" "-" "+." "-." "*" "*." "/" "/." "div" "mod" |
| 56 | + "shl" "shr" "andb" "xorb" "orb"] @operator |
| 57 | + _) |
| 58 | + |
| 59 | +(app_expr |
| 60 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "b"))) |
| 61 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.bold)))) |
| 62 | +(app_expr |
| 63 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "it"))) |
| 64 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.italic)))) |
| 65 | +(app_expr |
| 66 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "rm"))) |
| 67 | + (atomic_expr (layout_lit))) |
| 68 | +(app_expr |
| 69 | + (app_expr (atomic_expr (ident) @function.builtin (#match? @function.builtin "^(tt|courier|fixedersys)$"))) |
| 70 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.raw.inline)))) |
| 71 | +(app_expr |
| 72 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "title"))) |
| 73 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.1)))) |
| 74 | +(app_expr |
| 75 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "section"))) |
| 76 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.2)))) |
| 77 | +(app_expr |
| 78 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "subsection"))) |
| 79 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.3)))) |
| 80 | +(app_expr |
| 81 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "subsubsection"))) |
| 82 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.4)))) |
| 83 | +(app_expr |
| 84 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "paragraph"))) |
| 85 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.heading.5)))) |
| 86 | +(app_expr |
| 87 | + (app_expr (atomic_expr (ident) @function.builtin (#eq? @function.builtin "blockquote"))) |
| 88 | + (atomic_expr (layout_lit (layout_content (layout_text) @markup.quote)))) |
0 commit comments