From bad5f91416dc6d790c45c2ee10da4cfd2d6e0bdb Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 14 Feb 2022 14:09:56 +0100 Subject: [PATCH] Improve GDScript lexer for Godot 3.x - Add binary literals. - Update list of built-in functions for Godot 3.4. --- _extensions/gdscript.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/_extensions/gdscript.py b/_extensions/gdscript.py index d84312bfb..57ae272bd 100644 --- a/_extensions/gdscript.py +++ b/_extensions/gdscript.py @@ -190,6 +190,7 @@ class GDScriptLexer(RegexLexer): "atan", "atan2", "bytes2var", + "cartesian2polar", "ceil", "char", "clamp", @@ -199,6 +200,7 @@ class GDScriptLexer(RegexLexer): "db2linear", "decimals", "dectime", + "deep_equal", "deg2rad", "dict2inst", "ease", @@ -207,26 +209,41 @@ class GDScriptLexer(RegexLexer): "fmod", "fposmod", "funcref", + "get_stack", "hash", "inst2dict", "instance_from_id", + "inverse_lerp", + "is_equal_approx", "is_inf", + "is_instance_valid", "is_nan", + "is_zero_approx", + "len", "lerp", + "lerp_angle", "linear2db", "load", "log", "max", "min", + "move_toward", "nearest_po2", + "ord", + "parse_json", + "polar2cartesian", + "posmod", "pow", "preload", "print", + "print_debug", "print_stack", "printerr", "printraw", "prints", "printt", + "push_error", + "push_warning", "rad2deg", "rand_range", "rand_seed", @@ -234,23 +251,29 @@ class GDScriptLexer(RegexLexer): "randi", "randomize", "range", + "range_lerp", "round", "seed", "sign", "sin", "sinh", + "smoothstep", "sqrt", + "step_decimals", "stepify", "str", "str2var", "tan", - "tan", "tanh", - "type_exist", + "to_json", + "type_exists", "typeof", + "validate_json", "var2bytes", "var2str", "weakref", + "wrapf", + "wrapi", "yield", ), prefix=r"(?