File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ # # Syntax highlighting for Godot.
2
+
3
+ syntax gdscript " \. gd$ "
4
+ header " "
5
+ magic " Godot script"
6
+ comment " #"
7
+
8
+ # Function definitions.
9
+ color brightblue " func [0 -9A -Za -z_ ]+ "
10
+ # Keywords.
11
+ color brightred " \< (and| as| assert| async| await| break| class| continue)\> "
12
+ color brightred " \< (func| del| elif| else| except| finally| for| from)\> "
13
+ color brightred " \< (global| if| import| in| is| lambda| nonlocal| not| or)\> "
14
+ color brightred " \< (pass| raise| return| try| while| with| yield| extends)\> "
15
+
16
+ color brightcyan " \< (inline| Input| Array| inline)\> "
17
+ color brightcyan " \< (exec| print| call)\> "
18
+
19
+ # Special values.
20
+ color brightmagenta " \< (False| None| True)\> "
21
+
22
+ # Mono-quoted strings.
23
+ color brightyellow " '([^ ' \] | \\ . )* ' | " ([^" \] | \\ . )* " | ''' | """"
24
+ color normal "''' | """"
25
+ # Comments .
26
+ color brightred " (^| [[:blank :] ])#. * "
27
+ # variable
28
+ color brightgreen " \< (var| export| export_category)\> "
29
+
30
+
31
+ # Backslash escapes.
32
+ color lime " \\ ($ | [\' "abfnrtv ]| [0 -3 ]? [0 -7 ]? [0 -7 ]| x[[:xdigit :] ]{2 } )"
33
+ color lime " \\ (N\{ [[:alpha :] ]+ \} | u[[:xdigit :] ]{4 } | U[[:xdigit :] ]{8 } )"
34
+
35
+ # Reminders.
36
+ color brightwhite ,yellow " \< (FIXME| TODO| XXX)\> "
37
+
38
+ # Trailing whitespace.
39
+ color ,green " [[:space :] ]+ $ "
You can’t perform that action at this time.
0 commit comments