]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/gdscript.micro
convert tex.micro to use micro's colorscheme feature
[micro.git] / runtime / syntax / gdscript.micro
1 ## GDScript syntax file, based on Python syntax file.
2 ##
3 syntax "gdscript" "\.gd$"
4
5 ## built-in objects
6 color constant "\b(null|self|true|false)\b"
7 ## built-in attributes
8 # color constant "\b()\b"
9 ## built-in functions
10 color 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"
11 ## special method names
12 color identifier "\b(AnimationPlayer|AnimationTreePlayer|Button|Control|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|SceneTree|Spatial|SteamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\b"
13 ## types
14 color type "\b(Vector2|Vector3)\b"
15 ## definitions
16 color identifier "func [a-zA-Z_0-9]+" 
17 ## keywords
18 color statement "\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|export|extends|for|func|if|in|map|not|onready|or|pass|return|signal|var|while|yield)\b" 
19
20 ## decorators
21 color brightgreen "@.*[(]"
22
23 ## operators
24 color statement "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
25
26 ## parentheses
27 color statement "[(){}]" "\[" "\]"
28
29 ## numbers
30 color constant "\b[0-9]+\b"
31
32 ## strings
33 color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
34 color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
35 color constant.specialChar "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
36 color constant.string "`[^`]*`"
37
38 ## brightblacks
39 color comment "#.*$"
40
41 ## block brightblacks
42 color comment start=""""([^"]|$)" end="""""
43 color comment start="'''([^']|$)" end="'''"