forked from krobertson/warehouse
/
f-script.syntax
80 lines (80 loc) · 2.1 KB
/
f-script.syntax
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
70
71
72
73
74
75
76
77
78
79
80
---
name: F-Script
fileTypes:
- fscript
scopeName: source.fscript
uuid: C2CB9A74-C9FC-4F63-8BAF-E64B72A60DD4
foldingStartMarker: \[
patterns:
- name: meta.dummy.symbol.ignore.fscript
match: "(:|\\w):"
- name: constant.other.symbol.fscript
captures:
"1":
name: punctuation.definition.symbol.fscript
match: (:)\w+\b
- name: constant.numeric.fscript
match: \b((([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b
- name: constant.other.block.compact.fscript
match: "#([[:lower:]]|_|[+=\\-/!%&*|><~?])(\\w|[+=\\-/!%&*|><~?:])*"
- name: meta.block.empty.fscript
captures:
"1":
name: punctuation.section.block.fscript
"2":
name: variable.parameter.block.fscript
"3":
name: punctuation.section.block.fscript
match: (\[)(?:\s*((?::\w+\s+)*:\w+)\s*\|)?\s*(\])
- name: meta.block.fscript
endCaptures:
"0":
name: punctuation.section.block.fscript
begin: (\[)(?:\s*((?::\w+\s+)*:\w+)\s*\|)?
beginCaptures:
"1":
name: punctuation.section.block.fscript
"2":
name: variable.parameter.block.fscript
end: \]
patterns:
- name: meta.block.header.fscript
match: \s+
- name: meta.block.content.fscript
captures:
"1":
name: variable.other.local.fscript
begin: (?:\|(\s*(?:\w+\s+)*\w+\s*)?\||(?=[^\s|]))
end: (?=\])
patterns:
- include: $base
- name: constant.language.fscript
match: \b(true|YES|false|NO|sys|nil)\b
- captures:
"1":
name: entity.name.function.fscript
match: ^(\w+)\s*:=\s*(?=\[)
comment: a hack for the symbol popup
- name: comment.block.quotes.fscript
endCaptures:
"0":
name: punctuation.definition.comment.end.fscript
begin: "\""
beginCaptures:
"0":
name: punctuation.definition.comment.begin.fscript
end: "\""
- name: string.quoted.single.fscript
endCaptures:
"0":
name: punctuation.definition.string.end.fscript
begin: "'"
beginCaptures:
"0":
name: punctuation.definition.string.begin.fscript
end: "'"
patterns:
- name: constant.character.escape.fscript
match: \\.
foldingStopMarker: \]
keyEquivalent: ^~F