2021-03-11 00:35:00 +08:00
hljs . registerLanguage ( "gml" , ( ( ) => { "use strict" ; return e => ( { name : "GML" ,
2021-11-13 08:45:02 +08:00
case _insensitive : ! 1 , keywords : {
keyword : "begin end if then else while do for break continue with until repeat exit and or xor not return mod div switch case default var globalvar enum function constructor delete #macro #region #endregion" ,
built _in : " is _real is _string is _array is _undefined is _int32 is _int64 is _ptr is _vec3 is _vec4 is _matrix is _bool is _method is _struct is _infinity is _nan is _numeric typeof variable _global _exists variable _global _get variable _global _set variable _instance _exists variable _instance _get variable _instance _set variable _instance _get _names variable _struct _exists variable _struct _get variable _struct _get _names variable _struct _names _count variable _struct _remove variable _struct _set array _delete array _insert array _length array _length _1d array _length _2d array _height _2d array _equals array _create array _copy array _pop array _push array _resize array _sort random random _range irandom irandom _range random _set _seed random _get _seed randomize randomise choose abs round floor ceil sign frac sqrt sqr exp ln log2 log10 sin cos tan arcsin arccos arctan arctan2 dsin dcos dtan darcsin darccos darctan darctan2 degtorad radtodeg power logn min max mean median clamp lerp dot _product dot _product _3d dot _product _normalised dot _product _3d _normalised dot _product _normalized dot _product _3d _normalized math _set _epsilon math _get _epsilon angle _difference point _distance _3d point _distance point _direction lengthdir _x lengthdir _y real string int64 ptr string _format chr ansi _char ord string _length string _byte _length string _pos string _copy string _char _at string _ord _at string _byte _at string _set _byte _at string _delete string _insert string _lower string _upper string _repeat string _letters string _digits string _lettersdigits string _replace string _replace _all string _count string _hash _to _newline clipboard _has _text clipboard _set _text clipboard _get _text date _current _datetime date _create _datetime date _valid _datetime date _inc _year date _inc _month date _inc _week date _inc _day date _inc _hour date _inc _minute date _inc _second date _get _year date _get _month date _get _week date _get _day date _get _hour date _get _minute date _get _second date _get _weekday date _get _day _of _year date _get _hour _of _year date _get _minute _of _year date _get _second _of _year date _year _span date _month _span date _week _span date _day _span date _hour _span date _minute _span date _second _span date _compare _datetime date _compare _date date _compare _time date _date _of date _time _of date _datetime _string date _date _string date _time _string date _days _in _month date _days _in _year date _leap _year date _is _today date _set _timezone date _get _timezone game _set _speed game _get _speed motion _set motion _add place _free place _empty place _meeting place _snapped move _random move _snap move _towards _point move _contact _solid move _contact _all move _outside _solid move _outside _all move _bounce _solid move _bounce _all move _wrap distance _to _point distance _to _object position _empty position _meeting path _start path _end mp _linear _step mp _potential _step mp _linear _step _object mp _potential _step _object mp _potential _settings mp _linear _path mp _potential _path mp _linear _path _object mp _potential _path _object mp _grid _create mp _grid _destroy mp _grid _clear _all mp _grid _clear _cell mp _grid _clear _rectangle mp _grid _add _cell mp _grid _get _cell mp _grid _add _rectangle mp _grid _add _instances mp _grid _path mp _grid _draw mp _grid _to _ds _grid collision _point collision _rectangle collision _circle collision _ellipse collision _line collision _point _list collision _rectangle _list collision _circle _list collision _ellipse _list collision _line _list instance _position _list instance _place _list point _in _rectangle point _in _triangle point _in _circle rectangle _in _rectangle rectangle _in _triangle rectangle _in _circle instance _find instance _exists instance _number instance _position instance _nearest instance _furthest instance _place instance _create _depth instance _create _layer instance _copy instance _change instance _destroy position _destroy position _change instance _id _get instance _deactivate _all instance _deactivate _object instance _deactivate _region instance _activate _all instance _activate _object instance _activate _region room _goto room _goto _previous room _goto _next room _previous room _next room _restart game _end game _restart game _load game _save game _save _buffer game _load _buffer event _perform event _user event _perform _object event _inherited show _debug _message show _debug _ove
2021-03-11 00:35:00 +08:00
literal : " self other all noone global local undefined pointer _invalid pointer _null path _action _stop path _action _restart path _action _continue path _action _reverse true false pi GM _build _date GM _version GM _runtime _version timezone _local timezone _utc gamespeed _fps gamespeed _microseconds ev _create ev _destroy ev _step ev _alarm ev _keyboard ev _mouse ev _collision ev _other ev _draw ev _draw _begin ev _draw _end ev _draw _pre ev _draw _post ev _keypress ev _keyrelease ev _trigger ev _left _button ev _right _button ev _middle _button ev _no _button ev _left _press ev _right _press ev _middle _press ev _left _release ev _right _release ev _middle _release ev _mouse _enter ev _mouse _leave ev _mouse _wheel _up ev _mouse _wheel _down ev _global _left _button ev _global _right _button ev _global _middle _button ev _global _left _press ev _global _right _press ev _global _middle _press ev _global _left _release ev _global _right _release ev _global _middle _release ev _joystick1 _left ev _joystick1 _right ev _joystick1 _up ev _joystick1 _down ev _joystick1 _button1 ev _joystick1 _button2 ev _joystick1 _button3 ev _joystick1 _button4 ev _joystick1 _button5 ev _joystick1 _button6 ev _joystick1 _button7 ev _joystick1 _button8 ev _joystick2 _left ev _joystick2 _right ev _joystick2 _up ev _joystick2 _down ev _joystick2 _button1 ev _joystick2 _button2 ev _joystick2 _button3 ev _joystick2 _button4 ev _joystick2 _button5 ev _joystick2 _button6 ev _joystick2 _button7 ev _joystick2 _button8 ev _outside ev _boundary ev _game _start ev _game _end ev _room _start ev _room _end ev _no _more _lives ev _animation _end ev _end _of _path ev _no _more _health ev _close _button ev _user0 ev _user1 ev _user2 ev _user3 ev _user4 ev _user5 ev _user6 ev _user7 ev _user8 ev _user9 ev _user10 ev _user11 ev _user12 ev _user13 ev _user14 ev _user15 ev _step _normal ev _step _begin ev _step _end ev _gui ev _gui _begin ev _gui _end ev _cleanup ev _gesture ev _gesture _tap ev _gesture _double _tap ev _gesture _drag _start ev _gesture _dragging ev _gesture _drag _end ev _gesture _flick ev _gesture _pinch _start ev _gesture _pinch _in ev _gesture _pinch _out ev _gesture _pinch _end ev _gesture _rotate _start ev _gesture _rotating ev _gesture _rotate _end ev _global _gesture _tap ev _global _gesture _double _tap ev _global _gesture _drag _start ev _global _gesture _dragging ev _global _gesture _drag _end ev _global _gesture _flick ev _global _gesture _pinch _start ev _global _gesture _pinch _in ev _global _gesture _pinch _out ev _global _gesture _pinch _end ev _global _gesture _rotate _start ev _global _gesture _rotating ev _global _gesture _rotate _end vk _nokey vk _anykey vk _enter vk _return vk _shift vk _control vk _alt vk _escape vk _space vk _backspace vk _tab vk _pause vk _printscreen vk _left vk _right vk _up vk _down vk _home vk _end vk _delete vk _insert vk _pageup vk _pagedown vk _f1 vk _f2 vk _f3 vk _f4 vk _f5 vk _f6 vk _f7 vk _f8 vk _f9 vk _f10 vk _f11 vk _f12 vk _numpad0 vk _numpad1 vk _numpad2 vk _numpad3 vk _numpad4 vk _numpad5 vk _numpad6 vk _numpad7 vk _numpad8 vk _numpad9 vk _divide vk _multiply vk _subtract vk _add vk _decimal vk _lshift vk _lcontrol vk _lalt vk _rshift vk _rcontrol vk _ralt mb _any mb _none mb _left mb _right mb _middle c _aqua c _black c _blue c _dkgray c _fuchsia c _gray c _green c _lime c _ltgray c _maroon c _navy c _olive c _purple c _red c _silver c _teal c _white c _yellow c _orange fa _left fa _center fa _right fa _top fa _middle fa _bottom pr _pointlist pr _linelist pr _linestrip pr _trianglelist pr _trianglestrip pr _trianglefan bm _complex bm _normal bm _add bm _max bm _subtract bm _zero bm _one bm _src _colour bm _inv _src _colour bm _src _color bm _inv _src _color bm _src _alpha bm _inv _src _alpha bm _dest _alpha bm _inv _dest _alpha bm _dest _colour bm _inv _dest _colour bm _dest _color bm _inv _dest _color bm _src _alpha _sat tf _point tf _linear tf _anisotropic mip _off mip _on mip _markedonly audio _falloff _none audio _falloff _inverse _distance audio _falloff _inverse _distance _clamped audio _falloff _linear _distance audio _falloff _linear _distance _clamped audio _falloff _exponent _distance audio _falloff _exponent _distance _clamped audio _old _system audio _new _system audio _mono audio _stereo audio _3d cr _default cr _none cr _arrow cr _cross cr _beam cr _size _nesw cr _size _ns cr _size _nwse cr _size _we cr _uparrow cr _hourglass cr _drag cr _appstart cr _handpoint cr _size _all spritespeed _framespersecond spritespeed _framespergamefra
symbol : "argument_relative argument argument0 argument1 argument2 argument3 argument4 argument5 argument6 argument7 argument8 argument9 argument10 argument11 argument12 argument13 argument14 argument15 argument_count x|0 y|0 xprevious yprevious xstart ystart hspeed vspeed direction speed friction gravity gravity_direction path_index path_position path_positionprevious path_speed path_scale path_orientation path_endaction object_index id solid persistent mask_index instance_count instance_id room_speed fps fps_real current_time current_year current_month current_day current_weekday current_hour current_minute current_second alarm timeline_index timeline_position timeline_speed timeline_running timeline_loop room room_first room_last room_width room_height room_caption room_persistent score lives health show_score show_lives show_health caption_score caption_lives caption_health event_type event_number event_object event_action application_surface gamemaker_pro gamemaker_registered gamemaker_version error_occurred error_last debug_mode keyboard_key keyboard_lastkey keyboard_lastchar keyboard_string mouse_x mouse_y mouse_button mouse_lastbutton cursor_sprite visible sprite_index sprite_width sprite_height sprite_xoffset sprite_yoffset image_number image_index image_speed depth image_xscale image_yscale image_angle image_alpha image_blend bbox_left bbox_right bbox_top bbox_bottom layer background_colour background_showcolour background_color background_showcolor view_enabled view_current view_visible view_xview view_yview view_wview view_hview view_xport view_yport view_wport view_hport view_angle view_hborder view_vborder view_hspeed view_vspeed view_object view_surface_id view_camera game_id game_display_name game_project_name game_save_id working_directory temp_directory program_directory browser_width browser_height os_type os_device os_browser os_version display_aa async_load delta_time webgl_enabled event_data iap_data phy_rotation phy_position_x phy_position_y phy_angular_velocity phy_linear_velocity_x phy_linear_velocity_y phy_speed_x phy_speed_y phy_speed phy_angular_damping phy_linear_damping phy_bullet phy_fixed_rotation phy_active phy_mass phy_inertia phy_com_x phy_com_y phy_dynamic phy_kinematic phy_sleeping phy_collision_points phy_collision_x phy_collision_y phy_col_normal_x phy_col_normal_y phy_position_xprevious phy_position_yprevious"
} ,
contains : [ e . C _LINE _COMMENT _MODE , e . C _BLOCK _COMMENT _MODE , e . APOS _STRING _MODE , e . QUOTE _STRING _MODE , e . C _NUMBER _MODE ]
} ) } ) ( ) ) ;