This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
forked from gek169/seabass_syntax_highlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseabass.yaml
49 lines (42 loc) · 1.74 KB
/
seabass.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
filetype: seabass
detect:
filename: "(\\.(cbas|CBAS)$|\\.(hbas|HBAS))"
rules:
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
- type: "\\b(u8|i8|u16|i16|u32|i32|u64|i64|f32|f64|char|uchar|schar|byte|ubyte|sbyte|uint|int|sint|long|slong|ulong|llong|ullong|qword|uqword|uptr|sqword|float|double|short|ushort|sshort|string)\\b"
- statement: "\\b(noexport|atomic|volatile|pub|public|inline|codegen|pure|static|predecl|union)\\b"
- special: "\\b(fn|function|func|procedure|proc|cast|break|data|end|continue|if|elif|elseif|else|while|for|goto|jump|switch|return|tail|method|constexpri|constexprf|getfnptr|callfnptr|getglobalptr|asm|struct|class)\\b"
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|undef)"
# GCC builtins
# Operator Color
- symbol.operator: "[-+*/%=<>.:;,~&|^!?]|\\b(sizeof)\\b"
- symbol.brackets: "[(){}]|\\[|\\]"
# Integer Constants
- constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)\\b)"
# Decimal Floating Constants
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)\\b)"
# Hexadecimal Floating Constants
- constant.number: "(\\b0[Xx]([0-9A-Za-z]*\\b))"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\([\"'abfnrtv\\\\])"
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- error: "..+"
- constant.specialChar: "\\\\([\"'abfnrtv\\\\])"
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"