|
1 | 1 | /* |
2 | 2 | Language: GDScript |
3 | | -Author: Khairul Hidayat <me@khairul.my.id>, Nelson Sylvest*r Fritsch <info@nelsonfritsch.de> |
4 | | -Description: Programming language for Godot Game Engine |
| 3 | +Author: Khairul Hidayat <me@khairul.my.id>, Nelson Sylvest*r Fritsch <info@nelsonfritsch.de>, Hugo Locurcio <hugo.locurcio@hugo.pro> |
| 4 | +Description: Programming language for Godot Engine |
5 | 5 | */ |
6 | 6 |
|
7 | 7 | var module = module ? module : {}; // shim for browser use |
8 | | - |
| 8 | + |
9 | 9 | function hljsDefineGDScript(hljs) { |
10 | 10 | var KEYWORDS = { |
11 | 11 | 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 | + |
17 | 18 | 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 ' + |
30 | 31 | 'Vector2 Rect2 Transform2D Vector3 Rect3 Plane ' + |
31 | 32 | 'Quat Basis Transform Color RID Object NodePath ' + |
32 | 33 | 'Dictionary Array PoolByteArray PoolIntArray ' + |
33 | 34 | 'PoolRealArray PoolStringArray PoolVector2Array ' + |
34 | 35 | 'PoolVector3Array PoolColorArray', |
35 | | - |
| 36 | + |
36 | 37 | literal: |
37 | 38 | 'true false null' |
38 | 39 | }; |
39 | | - |
| 40 | + |
40 | 41 | return { |
41 | 42 | aliases: ['godot', 'gdscript'], |
42 | 43 | keywords: KEYWORDS, |
|
0 commit comments