]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/julia.yaml
better top
[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(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"
17     - statement: "\\b(abstract type|primitive type|mutable struct\\b)"
18       # decorators
19     - identifier.macro: "@[A-Za-z0-9_]+"
20       # operators
21     - symbol.operator: "[-+*/|=%<>&~^]|\\b(in|isa|where)\\b"
22       # parentheses
23     - symbol.brackets: "([(){}]|\\[|\\])"
24       # numbers
25     - 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"
26
27     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'"
28
29     - constant.string:
30         start: "\"\"\""
31         end: "\"\"\""
32         rules: []
33
34     - constant.string:
35         start: "'''"
36         end: "'''"
37         rules: []
38
39     - comment:
40         start: "#"
41         end: "$"
42         rules: []