]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/julia.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / julia.yaml
1 filetype: julia
2
3 detect:
4     filename: "\\.jl$"
5     header: "^#!.*/(env +)?julia( |$)"
6
7 rules:
8
9     # built-in objects
10     - constant.bool: "\\b(true|false)\\b"
11     - constant: "\\b(nothing|missing)\\b"
12       # built-in attributes
13     - constant: "__[A-Za-z0-9_]+__"
14       # definitions
15     - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
16       # keywords
17     - statement: "\\b(baremodule|begin|break|catch|const|continue|do|else|elseif|end|export|finally|for|function|global|if|import|let|local|macro|module|quote|return|struct|try|using|while)\\b"
18     - statement: "\\b(abstract\\s+type|primitive\\s+type|mutable\\s+struct)\\b"
19       # decorators
20     - identifier.macro: "@[A-Za-z0-9_]+"
21       # operators
22     - symbol.operator: "[-+*/|=%<>&~^]|\\b(in|isa|where)\\b"
23       # parentheses
24     - symbol.brackets: "([(){}]|\\[|\\])"
25       # numbers
26     - constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*|Inf(16|32|64)?|NaN(16|32|64)?)\\b"
27
28     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'"
29
30     - constant.string:
31         start: "\"\"\""
32         end: "\"\"\""
33         rules: []
34
35     - constant.string:
36         start: "\"[^\"]|\"$"
37         end: "\""
38         rules: []
39
40     - comment:
41         start: "#[^=]|#$"
42         end: "$"
43         rules: []
44
45     - comment:
46         start: "#="
47         end: "=#"
48         rules: []