mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
Update GDScriptLexer to GDScript 2.0
This commit is contained in:
+3
-13
@@ -146,13 +146,9 @@ class GDScriptLexer(RegexLexer):
|
|||||||
"extends",
|
"extends",
|
||||||
"is",
|
"is",
|
||||||
"func",
|
"func",
|
||||||
"setget",
|
|
||||||
"signal",
|
"signal",
|
||||||
"tool",
|
|
||||||
"const",
|
"const",
|
||||||
"enum",
|
"enum",
|
||||||
"export",
|
|
||||||
"onready",
|
|
||||||
"static",
|
"static",
|
||||||
"var",
|
"var",
|
||||||
"break",
|
"break",
|
||||||
@@ -165,12 +161,6 @@ class GDScriptLexer(RegexLexer):
|
|||||||
"return",
|
"return",
|
||||||
"match",
|
"match",
|
||||||
"while",
|
"while",
|
||||||
"remote",
|
|
||||||
"master",
|
|
||||||
"puppet",
|
|
||||||
"remotesync",
|
|
||||||
"mastersync",
|
|
||||||
"puppetsync",
|
|
||||||
),
|
),
|
||||||
suffix=r"\b",
|
suffix=r"\b",
|
||||||
),
|
),
|
||||||
@@ -189,6 +179,7 @@ class GDScriptLexer(RegexLexer):
|
|||||||
"assert",
|
"assert",
|
||||||
"atan",
|
"atan",
|
||||||
"atan2",
|
"atan2",
|
||||||
|
"await",
|
||||||
"bytes2var",
|
"bytes2var",
|
||||||
"ceil",
|
"ceil",
|
||||||
"char",
|
"char",
|
||||||
@@ -251,14 +242,13 @@ class GDScriptLexer(RegexLexer):
|
|||||||
"var2bytes",
|
"var2bytes",
|
||||||
"var2str",
|
"var2str",
|
||||||
"weakref",
|
"weakref",
|
||||||
"yield",
|
|
||||||
),
|
),
|
||||||
prefix=r"(?<!\.)",
|
prefix=r"(?<!\.)",
|
||||||
suffix=r"\b",
|
suffix=r"\b",
|
||||||
),
|
),
|
||||||
Name.Builtin,
|
Name.Builtin,
|
||||||
),
|
),
|
||||||
(r"((?<!\.)(self|false|true)|(PI|TAU|NAN|INF)" r")\b", Name.Builtin.Pseudo),
|
(r"((?<!\.)(self|super|false|true)|(PI|TAU|NAN|INF)" r")\b", Name.Builtin.Pseudo),
|
||||||
(
|
(
|
||||||
words(
|
words(
|
||||||
(
|
(
|
||||||
@@ -305,7 +295,7 @@ class GDScriptLexer(RegexLexer):
|
|||||||
(r"0[xX][a-fA-F0-9]+", Number.Hex),
|
(r"0[xX][a-fA-F0-9]+", Number.Hex),
|
||||||
(r"\d+j?", Number.Integer),
|
(r"\d+j?", Number.Integer),
|
||||||
],
|
],
|
||||||
"name": [(r"[a-zA-Z_]\w*", Name)],
|
"name": [(r"@?[a-zA-Z_]\w*", Name)],
|
||||||
"funcname": [(r"[a-zA-Z_]\w*", Name.Function, "#pop"), default("#pop")],
|
"funcname": [(r"[a-zA-Z_]\w*", Name.Function, "#pop"), default("#pop")],
|
||||||
"classname": [(r"[a-zA-Z_]\w*", Name.Class, "#pop")],
|
"classname": [(r"[a-zA-Z_]\w*", Name.Class, "#pop")],
|
||||||
"stringescape": [
|
"stringescape": [
|
||||||
|
|||||||
Reference in New Issue
Block a user