]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/julia.yaml
Merge pull request #1412 from tommyshem/batSyntaxHighlighting
[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       # built-in attributes
12     - constant: "__[A-Za-z0-9_]+__"
13       # definitions
14     - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
15       # keywords
16     - statement: "\\b(begin|break|catch|continue|function|elseif|struct|else|end|finally|for|global|local|const|if|include|import|using|require|macro|println|return|try|type|while|module)\\b"
17       # decorators
18     - identifier.macro: "@[A-Za-z0-9_]+"
19       # operators
20     - symbol.operator: "[-+*/|=%<>&~^]|\\b(and|not|or|is|in)\\b"
21       # parentheses
22     - symbol.brackets: "([(){}]|\\[|\\])"
23       # numbers
24     - constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*)\\b"
25
26     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'"
27
28     - constant.string:
29         start: "\"\"\""
30         end: "\"\"\""
31         rules: []
32
33     - constant.string:
34         start: "'''"
35         end: "'''"
36         rules: []
37
38     - comment:
39         start: "#"
40         end: "$"
41         rules: []