Skip to content

Commit

Permalink
Update keywords in grammar (AHK 1.1.36.00 and below) (#298)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Wiemer <[email protected]>
  • Loading branch information
kyklish and mark-wiemer authored Jan 17, 2023
1 parent e1a882f commit 03f124a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions language/ahk.tmLanguage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ repository:
name: support.function.ahk
example: .length
- match: >-
\b(?!MsgBox)(?i:a_ahkpath|a_args|a_listlines|a_sendmode|a_sendlevel|a_storecapslockmode|a_coordmodetooltip|a_coordmodepixel|a_coordmodemouse|a_coordmodecaret|a_coordmodemenu|a_timeidlekeyboard|a_timeidlemouse|a_defaultgui|a_defaultlistview|a_defaulttreeview|a_comspec|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles|true|false)\b
\b(?!MsgBox)(?i:a_ahkpath|a_args|a_listlines|a_sendmode|a_sendlevel|a_storecapslockmode|a_coordmodetooltip|a_coordmodepixel|a_coordmodemouse|a_coordmodecaret|a_coordmodemenu|a_timeidlekeyboard|a_timeidlemouse|a_defaultgui|a_defaultlistview|a_defaulttreeview|a_comspec|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_clipboard|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_initialworkingdir|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelayplay|a_keydelay|a_keydurationplay|a_keyduration|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfilepath|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelayplay|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles|true|false)\b
name: constant.language.ahk
example: A_ScriptDir
keyword:
Expand All @@ -113,11 +113,11 @@ repository:
name: support.class.ahk
example: this
- match: >-
\b(?!MsgBox)(?i:new|__New|__Delete|shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2|vk\d+|sc\d+)\b(?!\s*\()\b
\b(?!MsgBox)(?i:new|__New|__Delete|__Set|__Get|__Call|shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2|vk\d+|sc\d+)\b(?!\s*\()\b
name: keyword.keys.ahk
example: LButton
- match: >-
\b(?!MsgBox)(?<!\.)(?i:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|global|local|byref|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian|alwayson|alwaysoff|dpiscale|parent)(?!\[|\(|\.)\b
\b(?!MsgBox)(?<!\.)(?i:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_exe|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|global|local|byref|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|xs|ys|xp|yp|wp|hp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian|alwayson|alwaysoff|dpiscale|parent|reg|files|base)(?!\[|\(|\.)\b
name: keyword.other.ahk
example: text
- match: >-
Expand Down
38 changes: 19 additions & 19 deletions src/test/suite/grammar/samples/ahk-explorer.ahk.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5417,7 +5417,7 @@
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>files:=array_ToSpacedString(getSelectedPaths())
#^^^^^ source.ahk variable.def.ahk
#^^^^^ source.ahk keyword.other.ahk
# ^^ source.ahk keyword.operator.assignment.ahk
# ^^^^^^^^^^^^^^^^^^^^ source.ahk entity.name.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand All @@ -5437,7 +5437,7 @@
# ^^^^^^^^^^^ source.ahk variable.def.ahk
# ^ source.ahk
# ^ source.ahk punctuation.definition.variable.percent.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.definition.variable.percent.ahk
>soundplay, *-1
#^^^^^^^^^ source.ahk support.function.ahk
Expand Down Expand Up @@ -5614,7 +5614,7 @@
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>files:=StrSplit(clipboard, "`n","`r")
#^^^^^ source.ahk variable.def.ahk
#^^^^^ source.ahk keyword.other.ahk
# ^^ source.ahk keyword.operator.assignment.ahk
# ^^^^^^^^ source.ahk support.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand All @@ -5639,7 +5639,7 @@
# ^ source.ahk
# ^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>fileExist:=FileExist(v)
Expand Down Expand Up @@ -11193,7 +11193,7 @@
# ^^^^^^^^^^ source.ahk variable.def.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.bracket.ahk
>{
#^ source.ahk punctuation.bracket.ahk
Expand Down Expand Up @@ -11329,7 +11329,7 @@
# ^ source.ahk
# ^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>;IShellFolder:ParseDisplayName
Expand Down Expand Up @@ -13896,7 +13896,7 @@
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>files:=StrSplit(clipboard, "`n","`r")
#^^^^^ source.ahk variable.def.ahk
#^^^^^ source.ahk keyword.other.ahk
# ^^ source.ahk keyword.operator.assignment.ahk
# ^^^^^^^^ source.ahk support.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand All @@ -13921,7 +13921,7 @@
# ^ source.ahk
# ^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>fileExist:=FileExist(v)
Expand Down Expand Up @@ -14060,7 +14060,7 @@
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>files:=StrSplit(clipboard, "`n","`r")
#^^^^^ source.ahk variable.def.ahk
#^^^^^ source.ahk keyword.other.ahk
# ^^ source.ahk keyword.operator.assignment.ahk
# ^^^^^^^^ source.ahk support.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand Down Expand Up @@ -14097,7 +14097,7 @@
# ^ source.ahk
# ^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>fileExist:=FileExist(v)
Expand Down Expand Up @@ -17579,10 +17579,10 @@
# ^^ source.ahk keyword.operator.assignment.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^^^^ source.ahk variable.def.ahk
# ^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.keys.ahk
# ^ source.ahk punctuation.ahk
# ^^^^ source.ahk support.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand Down Expand Up @@ -17822,10 +17822,10 @@
# ^^ source.ahk keyword.operator.assignment.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^^^^ source.ahk variable.def.ahk
# ^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk punctuation.bracket.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.keys.ahk
# ^ source.ahk punctuation.ahk
# ^^^^ source.ahk support.function.ahk
# ^ source.ahk punctuation.bracket.ahk
Expand Down Expand Up @@ -20815,7 +20815,7 @@
#^^^^ source.ahk keyword.control.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^ source.ahk punctuation.definition.variable.percent.ahk
Expand Down Expand Up @@ -21122,7 +21122,7 @@
#^^^^ source.ahk keyword.control.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^ source.ahk punctuation.definition.variable.percent.ahk
Expand Down Expand Up @@ -21326,7 +21326,7 @@
#^^^^ source.ahk keyword.control.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^ source.ahk punctuation.definition.variable.percent.ahk
Expand Down Expand Up @@ -22013,7 +22013,7 @@
# ^^^^^^^^^^ source.ahk variable.def.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk punctuation.ahk
# ^ source.ahk
# ^^^^^^^^ source.ahk variable.def.ahk
Expand Down Expand Up @@ -22244,7 +22244,7 @@
# ^ source.ahk
# ^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^^^^^ source.ahk variable.def.ahk
# ^^^^^ source.ahk keyword.other.ahk
# ^ source.ahk
# ^ source.ahk punctuation.bracket.ahk
>;IShellFolder:ParseDisplayName
Expand Down

0 comments on commit 03f124a

Please sign in to comment.