-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathgleam.yaml
More file actions
69 lines (57 loc) · 2.37 KB
/
Copy pathgleam.yaml
File metadata and controls
69 lines (57 loc) · 2.37 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
filetype: gleam
detect:
filename: "\\.gleam$"
rules:
- identifier: "\\b[a-z][a-z0-9_]*\\b"
- statement: "\\b(as|assert|auto|case|const|delegate|derive|echo|else|fn|if|implement|import|let|macro|opaque|panic|pub|test|todo|type|use)\\b"
- type: "\\b[A-Z][a-zA-Z0-9_]*\\b"
- type: "\\b(Int|Float|String|Bool|List|Option|Result|BitArray)\\b"
- constant: "\\b(True|False|Nil)\\b"
- preproc: "@[a-z][a-z_]*"
- statement: "(\\|>|->|<-)"
- statement: "(\\.\\.|<>)"
- statement: "(==|!=|<=\\.|>=\\.|<\\.|>\\.|<=|>=)"
- statement: "(&&|\\|\\|)"
- statement: "(\\+\\.|-\\.|\\*\\.|/\\.|\\+|-|\\*|/|%)"
- statement: "(=|<|>|!|<<|>>)"
- constant.number: "\\b0b[01](_?[01])*\\b"
- constant.number: "\\b0o[0-7](_?[0-7])*\\b"
- constant.number: "\\b0x[0-9a-fA-F](_?[0-9a-fA-F])*\\b"
- constant.number: "\\b[0-9](_?[0-9])*(\\.[0-9](_?[0-9])*)?([eE][+-]?[0-9](_?[0-9])*)?\\b"
- default:
start: "#\\("
end: "\\)"
limit-group: special
rules:
- identifier: "\\b[a-z][a-z0-9_]*\\b"
- statement: "\\b(as|assert|auto|case|const|delegate|derive|echo|else|fn|if|implement|import|let|macro|opaque|panic|pub|test|todo|type|use)\\b"
- type: "\\b[A-Z][a-zA-Z0-9_]*\\b"
- type: "\\b(Int|Float|String|Bool|List|Option|Result|BitArray)\\b"
- constant: "\\b(True|False|Nil)\\b"
- statement: "(\\|>|->|<-)"
- statement: "(\\.\\.|<>)"
- statement: "(==|!=|<=\\.|>=\\.|<\\.|>\\.|<=|>=)"
- statement: "(&&|\\|\\|)"
- statement: "(\\+\\.|-\\.|\\*\\.|/\\.|\\+|-|\\*|/|%)"
- statement: "(=|<|>|!|<<|>>)"
- constant.number: "\\b0b[01](_?[01])*\\b"
- constant.number: "\\b0o[0-7](_?[0-7])*\\b"
- constant.number: "\\b0x[0-9a-fA-F](_?[0-9a-fA-F])*\\b"
- constant.number: "\\b[0-9](_?[0-9])*(\\.[0-9](_?[0-9])*)?([eE][+-]?[0-9](_?[0-9])*)?\\b"
- constant.string:
start: '"'
end: '"'
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: '"'
end: '"'
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|FIXME|XXX):?"