micro/runtime/syntax/julia.yaml

49 lines
1.4 KiB
YAML
Raw Normal View History

2017-08-14 18:59:29 +03:00
filetype: julia
detect:
filename: "\\.jl$"
header: "^#!.*/(env +)?julia( |$)"
rules:
# built-in objects
- constant.bool: "\\b(true|false)\\b"
- constant: "\\b(nothing|missing)\\b"
2017-08-14 18:59:29 +03:00
# built-in attributes
- constant: "__[A-Za-z0-9_]+__"
# definitions
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
# keywords
2019-04-09 00:39:46 +03:00
- 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"
- statement: "\\b(abstract\\s+type|primitive\\s+type|mutable\\s+struct)\\b"
2017-08-14 18:59:29 +03:00
# decorators
- identifier.macro: "@[A-Za-z0-9_]+"
# operators
2019-04-09 00:57:58 +03:00
- symbol.operator: "[-+*/|=%<>&~^]|\\b(in|isa|where)\\b"
2017-08-14 18:59:29 +03:00
# parentheses
- symbol.brackets: "([(){}]|\\[|\\])"
# numbers
- 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"
2017-08-14 18:59:29 +03:00
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'"
2017-08-14 22:18:48 +03:00
2017-08-14 18:59:29 +03:00
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules: []
- constant.string:
start: "\"[^\"]|\"$"
end: "\""
2017-08-14 18:59:29 +03:00
rules: []
- comment:
start: "#[^=]|#$"
2017-08-14 18:59:29 +03:00
end: "$"
rules: []
- comment:
start: "#="
end: "=#"
rules: []