Skip to content

Commit 96f48a8

Browse files
Merge pull request #2 from Calinou/update-syntax-definition
Update the syntax definition for Godot 3.1 and later
2 parents ff52aa1 + 2825c0f commit 96f48a8

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

gdscript.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
/*
22
Language: GDScript
3-
Author: Khairul Hidayat <[email protected]>, Nelson Sylvest*r Fritsch <[email protected]>
4-
Description: Programming language for Godot Game Engine
3+
Author: Khairul Hidayat <[email protected]>, Nelson Sylvest*r Fritsch <[email protected]>, Hugo Locurcio <[email protected]>
4+
Description: Programming language for Godot Engine
55
*/
66

77
var module = module ? module : {}; // shim for browser use
8-
8+
99
function hljsDefineGDScript(hljs) {
1010
var KEYWORDS = {
1111
keyword:
12-
'do var const extends is in export onready tool ' +
13-
'static setget signal breakpoint switch case ' +
14-
'assert break continue elif else for if ' +
15-
'pass return while match master sync slave rpc enum',
16-
12+
'and in not or self void as assert breakpoint class class_name ' +
13+
'extends is func setget signal tool yield const enum export ' +
14+
'onready static var break continue if elif else for pass return ' +
15+
'match while remote sync master puppet remotesync mastersync ' +
16+
'puppetsync',
17+
1718
built_in:
18-
'Color8 ColorN abs acos asin assert atan atan2 ' +
19-
'bytes2var ceil char clamp convert cos cosh ' +
20-
'db2linear decimals dectime deg2rad dict2inst ' +
21-
'ease exp floor fmod fposmod funcref hash ' +
22-
'inst2dict instance_from_id is_inf is_nan lerp ' +
23-
'linear2db load log max min nearest_po2 pow ' +
24-
'preload print print_stack printerr printraw ' +
25-
'prints printt rad2deg rand_range rand_seed ' +
26-
'randf randi randomize range round seed sign ' +
27-
'sin sinh sqrt stepify str str2var tan ' +
28-
'tan tanh type_exist typeof var2bytes var2str ' +
29-
'weakref yield bool int float String NodePath ' +
19+
'Color8 ColorN abs acos asin atan atan2 bytes2var ' +
20+
'cartesian2polar ceil char clamp convert cos cosh db2linear ' +
21+
'decimals dectime deg2rad dict2inst ease exp floor fmod fposmod ' +
22+
'funcref get_stack hash inst2dict instance_from_id inverse_lerp ' +
23+
'is_equal_approx is_inf is_instance_valid is_nan is_zero_approx ' +
24+
'len lerp lerp_angle linear2db load log max min move_toward ' +
25+
'nearest_po2 ord parse_json polar2cartesian posmod pow preload ' +
26+
'print_stack push_error push_warning rad2deg rand_range ' +
27+
'rand_seed randf randi randomize range_lerp round seed sign sin ' +
28+
'sinh smoothstep sqrt step_decimals stepify str str2var tan tanh ' +
29+
'to_json type_exists typeof validate_json var2bytes var2str ' +
30+
'weakref wrapf wrapi bool int float String NodePath ' +
3031
'Vector2 Rect2 Transform2D Vector3 Rect3 Plane ' +
3132
'Quat Basis Transform Color RID Object NodePath ' +
3233
'Dictionary Array PoolByteArray PoolIntArray ' +
3334
'PoolRealArray PoolStringArray PoolVector2Array ' +
3435
'PoolVector3Array PoolColorArray',
35-
36+
3637
literal:
3738
'true false null'
3839
};
39-
40+
4041
return {
4142
aliases: ['godot', 'gdscript'],
4243
keywords: KEYWORDS,

0 commit comments

Comments
 (0)