]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/julia.yaml
b8d301ffe21bf87dc4256ecdc0d2aa6623e68df3
[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|let|const|if|import|using|macro|println|return|try|while|module)\\b"
17       # decorators
18     - identifier.macro: "@[A-Za-z0-9_]+"
19       # operators
20     - symbol.operator: "[-+*/|=%<>&~^]|\\b(isa|in)\\b"
21       # parentheses
22     - symbol.brackets: "([(){}]|\\[|\\])"
23       # numbers
24     - constant.number: "\\b[0-9]+\\b"
25
26     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
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: []