forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdscript.yaml
61 lines (51 loc) · 2.29 KB
/
gdscript.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
49
50
51
52
53
54
55
56
57
58
59
60
61
filetype: gdscript
detect:
filename: "\\.gd$"
rules:
# Built-in constants
- constant: "\\b(INF|NAN|PI|TAU)\\b"
- constant.bool: "\\b(null|true|false)\\b"
# Built-in functions
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|clamp|convert|cos|cosh|db2linear|decimals|deg2rad|ease|exp|float|floor|fmod|fposmod|hash|int|isinf|isnan|lerp|linear2db|load|log|max|min|nearest_po2|pow|preload|print|printerr|printraw|prints|printt|rad2deg|rand_range|rand_seed|randomize|randi|randf|range|round|seed|sin|slerp|sqrt|str|str2var|tan|typeof|var2str|weakref)\\b"
# Built-in node names
- identifier: "\\b(AnimationPlayer|AnimationTreePlayer|Button|Control|Engine|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|OS|SceneTree|Spatial|StreamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\\b"
# Types
- type: "\\b(AABB|Array|Basis|Color|Dictionary|NodePath|Object|Plane|PoolByteArray|PoolColorArray|PoolIntArray|PoolRealArray|PoolVector2Array|PoolVector3Array|Quat|Rect2|RID|String|Transform|Transform2D|Vector2|Vector3)\\b"
# Definitions
- identifier: "func [a-zA-Z_0-9]+"
# Keywords
- statement: "\\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|enum|export|extends|for|func|if|in|is|map|master|mastersync|match|not|onready|or|pass|remote|remotesync|return|self|setget|slave|slavesync|signal|sync|tool|var|while|yield)\\b"
# Operators
- statement: "[.:;,+*|=!\\%@]|<|>|/|-|&"
# Parentheses
- statement: "[(){}]|\\[|\\]"
# Numbers
- constant: "\\b[0-9]+\\b"
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
- comment:
start: "\"\"\""
end: "\"\"\""
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "'''"
end: "'''"
rules:
- todo: "(TODO|XXX|FIXME):?"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"