2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/autohotkey_highlight_rules" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text_highlight_rules" ] , function ( require , exports , module ) { /* This file was autogenerated from C:\Users\LED\Desktop\AutoHotKey.tmLanguage (uuid: ) */
2014-07-08 20:15:22 +00:00
"use strict" ;
2013-12-30 15:00:16 +00:00
var oop = require ( "../lib/oop" ) ;
var TextHighlightRules = require ( "./text_highlight_rules" ) . TextHighlightRules ;
2023-01-16 22:26:34 +00:00
var AutoHotKeyHighlightRules = function ( ) {
var autoItKeywords = 'And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|' +
2013-12-30 15:00:16 +00:00
' Abs | ACos | AdlibDisable | AdlibEnable | Asc | AscW | ASin | Assign | ATan | AutoItSetOption | AutoItWinGetTitle | AutoItWinSetTitle | Beep | Binary | BinaryLen | BinaryMid | BinaryToString | BitAND | BitNOT | BitOR | BitRotate | BitShift | BitXOR | BlockInput | Break | Call | CDTray | Ceiling | Chr | ChrW | ClipGet | ClipPut | ConsoleRead | ConsoleWrite | ConsoleWriteError | ControlClick | ControlCommand | ControlDisable | ControlEnable | ControlFocus | ControlGetFocus | ControlGetHandle | ControlGetPos | ControlGetText | ControlHide | ControlListView | ControlMove | ControlSend | ControlSetText | ControlShow | ControlTreeView | Cos | Dec | DirCopy | DirCreate | DirGetSize | DirMove | DirRemove | DllCall | DllCallbackFree | DllCallbackGetPtr | DllCallbackRegister | DllClose | DllOpen | DllStructCreate | DllStructGetData | DllStructGetPtr | DllStructGetSize | DllStructSetData | DriveGetDrive | DriveGetFileSystem | DriveGetLabel | DriveGetSerial | DriveGetType | DriveMapAdd | DriveMapDel | DriveMapGet | DriveSetLabel | DriveSpaceFree | DriveSpaceTotal | DriveStatus | EnvGet | EnvSet | EnvUpdate | Eval | Execute | Exp | FileChangeDir | FileClose | FileCopy | FileCreateNTFSLink | FileCreateShortcut | FileDelete | FileExists | FileFindFirstFile | FileFindNextFile | FileGetAttrib | FileGetLongName | FileGetShortcut | FileGetShortName | FileGetSize | FileGetTime | FileGetVersion | FileInstall | FileMove | FileOpen | FileOpenDialog | FileRead | FileReadLine | FileRecycle | FileRecycleEmpty | FileSaveDialog | FileSelectFolder | FileSetAttrib | FileSetTime | FileWrite | FileWriteLine | Floor | FtpSetProxy | GUICreate | GUICtrlCreateAvi | GUICtrlCreateButton | GUICtrlCreateCheckbox | GUICtrlCreateCombo | GUICtrlCreateContextMenu | GUICtrlCreateDate | GUICtrlCreateDummy | GUICtrlCreateEdit | GUICtrlCreateGraphic | GUICtrlCreateGroup | GUICtrlCreateIcon | GUICtrlCreateInput | GUICtrlCreateLabel | GUICtrlCreateList | GUICtrlCreateListView | GUICtrlCreateListViewItem | GUICtrlCreateMenu | GUICtrlCreateMenuItem | GUICtrlCreateMonthCal | GUICtrlCreateObj | GUICtrlCreatePic | GUICtrlCreateProgress | GUICtrlCreateRadio | GUICtrlCreateSlider | GUICtrlCreateTab | GUICtrlCreateTabItem | GUICtrlCreateTreeView | GUICtrlCreateTreeViewItem | GUICtrlCreateUpdown | GUICtrlDelete | GUICtrlGetHandle | GUICtrlGetState | GUICtrlRead | GUICtrlRecvMsg | GUICtrlRegisterListViewSort | GUICtrlSendMsg | GUICtrlSendToDummy | GUICtrlSetBkColor | GUICtrlSetColor | GUICtrlSetCursor | GUICtrlSetData | GUICtrlSetFont | GUICtrlSetDefColor | GUICtrlSetDefBkColor | GUICtrlSetGraphic | GUICtrlSetImage | GUICtrlSetLimit | GUICtrlSetOnEvent | GUICtrlSetPos | GUICtrlSetResizing | GUICtrlSetState | GUICtrlSetStyle | GUICtrlSetTip | GUIDelete | GUIGetCursorInfo | GUIGetMsg | GUIGetStyle | GUIRegisterMsg | GUISetAccelerators ( ) | GUISetBkColor | GUISetCoord | GUISetCursor | GUISetFont | GUISetHelp | GUISetIcon | GUISetOnEvent | GUISetState | GUISetStyle | GUIStartGroup | GUISwitch | Hex | HotKeySet | HttpSetProxy | HWnd | InetGet | InetGetSize | IniDelete | IniRead | IniReadSection | IniReadSectionNames | IniRenameSection | IniWrite | IniWriteSection | InputBox | Int | IsAdmin | IsArray | IsBinary | IsBool | IsDeclared | IsDllStruct | IsFloat | IsHWnd | IsInt | IsKeyword | IsNumber | IsObj | IsPtr | IsString | Log | MemGetStats | Mod | MouseClick | MouseClickDrag | MouseDown | MouseGetCursor | MouseGetPos | MouseMove | MouseUp | MouseWheel | MsgBox | Number | ObjCreate | ObjEvent | ObjGet | ObjName | Opt | Ping | PixelChecksum | PixelGetColor | PixelSearch | PluginClose | PluginOpen | ProcessClose | ProcessExists | ProcessGetStats | ProcessList | ProcessSetPriority | ProcessWait | ProcessWaitClose | ProgressOff | ProgressOn | ProgressSet | Ptr | Random | RegDelete | RegEnumKey | RegEnumVal | RegRead | RegWrite | Round | Run | RunAs | RunAsWait | RunWait | Send | SendKeepActive | SetError | SetExtended | ShellExecute | ShellExecuteWait | Shutdown | Sin | Sleep | SoundPlay | SoundSetWaveVolume | SplashImageOn | SplashOff | SplashTextOn | Sqrt | SRandom | StatusbarGetText | StderrRead | StdinWrite | StdioClose | StdoutRead | String | StringAddCR | StringCompare | StringFormat | StringInStr | StringIsAlNum | StringIsAlpha | StringIsASCII | StringIsDigit | StringIsFloat | StringIsInt | StringIsLower | StringIsSpace | StringIsUpper | StringIsXDigit | StringLeft | StringLen | StringLower | StringMid | StringRegExp | StringRegExpReplace | StringReplace | StringRight | StringSplit | StringStripCR | StringStripWS | StringToBinary | StringTrimLeft | StringTrimRight | StringUpper | Tan | TCPAccept | TCPCloseSocket | TCPConnect | TCPListen | TCPNameToIP | TCPRecv | TCPSend | TCPShutdown | TCPStartup | TimerDiff | Tim
' ArrayAdd | ArrayBinarySearch | ArrayConcatenate | ArrayDelete | ArrayDisplay | ArrayFindAll | ArrayInsert | ArrayMax | ArrayMaxIndex | ArrayMin | ArrayMinIndex | ArrayPop | ArrayPush | ArrayReverse | ArraySearch | ArraySort | ArraySwap | ArrayToClip | ArrayToString | ArrayTrim | ChooseColor | ChooseFont | ClipBoard _ChangeChain | ClipBoard _Close | ClipBoard _CountFormats | ClipBoard _Empty | ClipBoard _EnumFormats | ClipBoard _FormatStr | ClipBoard _GetData | ClipBoard _GetDataEx | ClipBoard _GetFormatName | ClipBoard _GetOpenWindow | ClipBoard _GetOwner | ClipBoard _GetPriorityFormat | ClipBoard _GetSequenceNumber | ClipBoard _GetViewer | ClipBoard _IsFormatAvailable | ClipBoard _Open | ClipBoard _RegisterFormat | ClipBoard _SetData | ClipBoard _SetDataEx | ClipBoard _SetViewer | ClipPutFile | ColorConvertHSLtoRGB | ColorConvertRGBtoHSL | ColorGetBlue | ColorGetGreen | ColorGetRed | Date _Time _CompareFileTime | Date _Time _DOSDateTimeToArray | Date _Time _DOSDateTimeToFileTime | Date _Time _DOSDateTimeToStr | Date _Time _DOSDateToArray | Date _Time _DOSDateToStr | Date _Time _DOSTimeToArray | Date _Time _DOSTimeToStr | Date _Time _EncodeFileTime | Date _Time _EncodeSystemTime | Date _Time _FileTimeToArray | Date _Time _FileTimeToDOSDateTime | Date _Time _FileTimeToLocalFileTime | Date _Time _FileTimeToStr | Date _Time _FileTimeToSystemTime | Date _Time _GetFileTime | Date _Time _GetLocalTime | Date _Time _GetSystemTime | Date _Time _GetSystemTimeAdjustment | Date _Time _GetSystemTimeAsFileTime | Date _Time _GetSystemTimes | Date _Time _GetTickCount | Date _Time _GetTimeZoneInformation | Date _Time _LocalFileTimeToFileTime | Date _Time _SetFileTime | Date _Time _SetLocalTime | Date _Time _SetSystemTime | Date _Time _SetSystemTimeAdjustment | Date _Time _SetTimeZoneInformation | Date _Time _SystemTimeToArray | Date _Time _SystemTimeToDateStr | Date _Time _SystemTimeToDateTimeStr | Date _Time _SystemTimeToFileTime | Date _Time _SystemTimeToTimeStr | Date _Time _SystemTimeToTzSpecificLocalTime | Date _Time _TzSpecificLocalTimeToSystemTime | DateAdd | DateDayOfWeek | DateDaysInMonth | DateDiff | DateIsLeapYear | DateIsValid | DateTimeFormat | DateTimeSplit | DateToDayOfWeek | DateToDayOfWeekISO | DateToDayValue | DateToMonth | DayValueToDate | DebugBugReportEnv | DebugOut | DebugSetup | Degree | EventLog _ _Backup | EventLog _ _Clear | EventLog _ _Close | EventLog _ _Count | EventLog _ _DeregisterSource | EventLog _ _Full | EventLog _ _Notify | EventLog _ _Oldest | EventLog _ _Open | EventLog _ _OpenBackup | EventLog _ _Read | EventLog _ _RegisterSource | EventLog _ _Report | FileCountLines | FileCreate | FileListToArray | FilePrint | FileReadToArray | FileWriteFromArray | FileWriteLog | FileWriteToLine | GDIPlus _ArrowCapCreate | GDIPlus _ArrowCapDispose | GDIPlus _ArrowCapGetFillState | GDIPlus _ArrowCapGetHeight | GDIPlus _ArrowCapGetMiddleInset | GDIPlus _ArrowCapGetWidth | GDIPlus _ArrowCapSetFillState | GDIPlus _ArrowCapSetHeight | GDIPlus _ArrowCapSetMiddleInset | GDIPlus _ArrowCapSetWidth | GDIPlus _BitmapCloneArea | GDIPlus _BitmapCreateFromFile | GDIPlus _BitmapCreateFromGraphics | GDIPlus _BitmapCreateFromHBITMAP | GDIPlus _BitmapCreateHBITMAPFromBitmap | GDIPlus _BitmapDispose | GDIPlus _BitmapLockBits | GDIPlus _BitmapUnlockBits | GDIPlus _BrushClone | GDIPlus _BrushCreateSolid | GDIPlus _BrushDispose | GDIPlus _BrushGetType | GDIPlus _CustomLineCapDispose | GDIPlus _Decoders | GDIPlus _DecodersGetCount | GDIPlus _DecodersGetSize | GDIPlus _Encoders | GDIPlus _EncodersGetCLSID | GDIPlus _EncodersGetCount | GDIPlus _EncodersGetParamList | GDIPlus _EncodersGetParamListSize | GDIPlus _EncodersGetSize | GDIPlus _FontCreate | GDIPlus _FontDispose | GDIPlus _FontFamilyCreate | GDIPlus _FontFamilyDispose | GDIPlus _GraphicsClear | GDIPlus _GraphicsCreateFromHDC | GDIPlus _GraphicsCreateFromHWND | GDIPlus _GraphicsDispose | GDIPlus _GraphicsDrawArc | GDIPlus _GraphicsDrawBezier | GDIPlus _GraphicsDrawClosedCurve | GDIPlus _GraphicsDrawCurve | GDIPlus _GraphicsDrawEllipse | GDIPlus _GraphicsDrawImage | GDIPlus _GraphicsDrawImageRect | GDIPlus _GraphicsDrawImageRectRect | GDIPlus _GraphicsDrawLine | GDIPlus _GraphicsDrawPie | GDIPlus _GraphicsDrawPolygon | GDIPlus _GraphicsDrawRect | GDIPlus _GraphicsDrawString | GDIPlus _GraphicsDrawStringEx | GDIPlus _GraphicsFillClosedCurve | GDIPlus _GraphicsFillEllipse | GDIPlus _GraphicsFillPie | GDIPlus _GraphicsFillRect | GDIPlus _GraphicsGetDC | GDIPlus _GraphicsGetSmoothingMode | GDIPlus _GraphicsMeasureString | GDIPlus _GraphicsReleaseDC | GDIPlus _GraphicsSetSmoothingMode | GDIPlus _GraphicsSetTransform | GD
'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' +
2020-04-14 12:14:48 +00:00
'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters' ;
var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR' ;
2023-01-16 22:26:34 +00:00
this . $rules = { start : [ { token : 'comment.line.ahk' , regex : '(?:^| );.*$' } ,
{ token : 'comment.block.ahk' ,
regex : '/\\*' , push : [ { token : 'comment.block.ahk' , regex : '\\*/' , next : 'pop' } ,
{ defaultToken : 'comment.block.ahk' } ] } ,
{ token : 'doc.comment.ahk' ,
regex : '#cs' , push : [ { token : 'doc.comment.ahk' , regex : '#ce' , next : 'pop' } ,
{ defaultToken : 'doc.comment.ahk' } ] } ,
{ token : 'keyword.command.ahk' ,
regex : '(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b' ,
caseInsensitive : true } ,
{ token : 'keyword.control.ahk' ,
regex : '(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b' ,
caseInsensitive : true } ,
{ token : 'support.function.ahk' ,
regex : '(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b' ,
caseInsensitive : true } ,
{ token : 'variable.predefined.ahk' ,
regex : '(?:\\b|^)(?:a_ahkpath|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_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_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|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|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|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)\\b' ,
caseInsensitive : true } ,
{ token : 'support.constant.ahk' ,
regex : '(?:\\b|^)(?: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)\\b' ,
caseInsensitive : true } ,
{ token : 'variable.parameter' ,
regex : '(?:\\b|^)(?: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|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)\\b' ,
caseInsensitive : true } ,
{ keywordMap : { "constant.language" : autoItKeywords } , regex : '\\w+\\b' } ,
{ keywordMap : { "variable.function" : atKeywords } , regex : '@\\w+\\b' } ,
{ token : "constant.numeric" , regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" } ,
{ token : 'keyword.operator.ahk' ,
regex : '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' } ,
{ token : 'punctuation.ahk' ,
regex : /#|`|::|,|%/ } ,
{ token : 'paren' ,
regex : /[{}()]/ } ,
{ token : [ 'punctuation.quote.double' ,
'string.quoted.ahk' ,
'punctuation.quote.double' ] ,
regex : '(")((?:[^"]|"")*)(")' } ,
{ token : [ 'label.ahk' , 'punctuation.definition.label.ahk' ] ,
regex : '^([^: ]+)(:)(?!:)' } ] } ;
2013-12-30 15:00:16 +00:00
this . normalizeRules ( ) ;
} ;
AutoHotKeyHighlightRules . metaData = { name : 'AutoHotKey' ,
2023-01-16 22:26:34 +00:00
scopeName : 'source.ahk' ,
fileTypes : [ 'ahk' ] ,
foldingStartMarker : '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))' ,
foldingStopMarker : '^\\s*\\*/|^\\s*\\}' } ;
2013-12-30 15:00:16 +00:00
oop . inherits ( AutoHotKeyHighlightRules , TextHighlightRules ) ;
exports . AutoHotKeyHighlightRules = AutoHotKeyHighlightRules ;
2023-01-16 22:26:34 +00:00
} ) ;
2013-12-30 15:00:16 +00:00
2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/folding/cstyle" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/range" , "ace/mode/folding/fold_mode" ] , function ( require , exports , module ) { "use strict" ;
2013-12-30 15:00:16 +00:00
var oop = require ( "../../lib/oop" ) ;
var Range = require ( "../../range" ) . Range ;
var BaseFoldMode = require ( "./fold_mode" ) . FoldMode ;
2023-01-16 22:26:34 +00:00
var FoldMode = exports . FoldMode = function ( commentRegex ) {
2013-12-30 15:00:16 +00:00
if ( commentRegex ) {
2023-01-16 22:26:34 +00:00
this . foldingStartMarker = new RegExp ( this . foldingStartMarker . source . replace ( /\|[^|]*?$/ , "|" + commentRegex . start ) ) ;
this . foldingStopMarker = new RegExp ( this . foldingStopMarker . source . replace ( /\|[^|]*?$/ , "|" + commentRegex . end ) ) ;
2013-12-30 15:00:16 +00:00
}
} ;
oop . inherits ( FoldMode , BaseFoldMode ) ;
2023-01-16 22:26:34 +00:00
( function ( ) {
2020-04-14 12:14:48 +00:00
this . foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/ ;
this . foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/ ;
2023-01-16 22:26:34 +00:00
this . singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/ ;
2014-07-08 20:15:22 +00:00
this . tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/ ;
2015-11-19 16:37:40 +00:00
this . startRegionRe = /^\s*(\/\*|\/\/)#?region\b/ ;
2014-07-08 20:15:22 +00:00
this . _getFoldWidgetBase = this . getFoldWidget ;
2023-01-16 22:26:34 +00:00
this . getFoldWidget = function ( session , foldStyle , row ) {
2014-07-08 20:15:22 +00:00
var line = session . getLine ( row ) ;
if ( this . singleLineBlockCommentRe . test ( line ) ) {
if ( ! this . startRegionRe . test ( line ) && ! this . tripleStarBlockCommentRe . test ( line ) )
return "" ;
}
var fw = this . _getFoldWidgetBase ( session , foldStyle , row ) ;
if ( ! fw && this . startRegionRe . test ( line ) )
return "start" ; // lineCommentRegionStart
return fw ;
} ;
2023-01-16 22:26:34 +00:00
this . getFoldWidgetRange = function ( session , foldStyle , row , forceMultiline ) {
2013-12-30 15:00:16 +00:00
var line = session . getLine ( row ) ;
2014-07-08 20:15:22 +00:00
if ( this . startRegionRe . test ( line ) )
return this . getCommentRegionBlock ( session , line , row ) ;
2013-12-30 15:00:16 +00:00
var match = line . match ( this . foldingStartMarker ) ;
if ( match ) {
var i = match . index ;
if ( match [ 1 ] )
return this . openingBracketBlock ( session , match [ 1 ] , row , i ) ;
var range = session . getCommentFoldRange ( row , i + match [ 0 ] . length , 1 ) ;
if ( range && ! range . isMultiLine ( ) ) {
if ( forceMultiline ) {
range = this . getSectionRange ( session , row ) ;
2023-01-16 22:26:34 +00:00
}
else if ( foldStyle != "all" )
2013-12-30 15:00:16 +00:00
range = null ;
}
return range ;
}
if ( foldStyle === "markbegin" )
return ;
var match = line . match ( this . foldingStopMarker ) ;
if ( match ) {
var i = match . index + match [ 0 ] . length ;
if ( match [ 1 ] )
return this . closingBracketBlock ( session , match [ 1 ] , row , i ) ;
return session . getCommentFoldRange ( row , i , - 1 ) ;
}
} ;
2023-01-16 22:26:34 +00:00
this . getSectionRange = function ( session , row ) {
2013-12-30 15:00:16 +00:00
var line = session . getLine ( row ) ;
var startIndent = line . search ( /\S/ ) ;
var startRow = row ;
var startColumn = line . length ;
row = row + 1 ;
var endRow = row ;
var maxRow = session . getLength ( ) ;
while ( ++ row < maxRow ) {
line = session . getLine ( row ) ;
var indent = line . search ( /\S/ ) ;
if ( indent === - 1 )
continue ;
2023-01-16 22:26:34 +00:00
if ( startIndent > indent )
2013-12-30 15:00:16 +00:00
break ;
var subRange = this . getFoldWidgetRange ( session , "all" , row ) ;
if ( subRange ) {
if ( subRange . start . row <= startRow ) {
break ;
2023-01-16 22:26:34 +00:00
}
else if ( subRange . isMultiLine ( ) ) {
2013-12-30 15:00:16 +00:00
row = subRange . end . row ;
2023-01-16 22:26:34 +00:00
}
else if ( startIndent == indent ) {
2013-12-30 15:00:16 +00:00
break ;
}
}
endRow = row ;
}
return new Range ( startRow , startColumn , endRow , session . getLine ( endRow ) . length ) ;
} ;
2023-01-16 22:26:34 +00:00
this . getCommentRegionBlock = function ( session , line , row ) {
2014-07-08 20:15:22 +00:00
var startColumn = line . search ( /\s*$/ ) ;
var maxRow = session . getLength ( ) ;
var startRow = row ;
2015-11-19 16:37:40 +00:00
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/ ;
2014-07-08 20:15:22 +00:00
var depth = 1 ;
while ( ++ row < maxRow ) {
line = session . getLine ( row ) ;
var m = re . exec ( line ) ;
2023-01-16 22:26:34 +00:00
if ( ! m )
continue ;
if ( m [ 1 ] )
depth -- ;
else
depth ++ ;
if ( ! depth )
break ;
2014-07-08 20:15:22 +00:00
}
var endRow = row ;
if ( endRow > startRow ) {
return new Range ( startRow , startColumn , endRow , line . length ) ;
}
} ;
2013-12-30 15:00:16 +00:00
} ) . call ( FoldMode . prototype ) ;
} ) ;
2014-07-08 20:15:22 +00:00
2023-01-16 22:26:34 +00:00
ace . define ( "ace/mode/autohotkey" , [ "require" , "exports" , "module" , "ace/lib/oop" , "ace/mode/text" , "ace/mode/autohotkey_highlight_rules" , "ace/mode/folding/cstyle" ] , function ( require , exports , module ) { / *
THIS FILE WAS AUTOGENERATED BY mode . tmpl . js
* /
2014-07-08 20:15:22 +00:00
"use strict" ;
var oop = require ( "../lib/oop" ) ;
var TextMode = require ( "./text" ) . Mode ;
var AutoHotKeyHighlightRules = require ( "./autohotkey_highlight_rules" ) . AutoHotKeyHighlightRules ;
var FoldMode = require ( "./folding/cstyle" ) . FoldMode ;
2023-01-16 22:26:34 +00:00
var Mode = function ( ) {
2014-07-08 20:15:22 +00:00
this . HighlightRules = AutoHotKeyHighlightRules ;
this . foldingRules = new FoldMode ( ) ;
2017-02-05 20:05:00 +00:00
this . $behaviour = this . $defaultBehaviour ;
2014-07-08 20:15:22 +00:00
} ;
oop . inherits ( Mode , TextMode ) ;
2023-01-16 22:26:34 +00:00
( function ( ) {
2014-07-08 20:15:22 +00:00
this . lineCommentStart = ";" ;
2023-01-16 22:26:34 +00:00
this . blockComment = { start : "/*" , end : "*/" } ;
2014-07-08 20:15:22 +00:00
this . $id = "ace/mode/autohotkey" ;
} ) . call ( Mode . prototype ) ;
exports . Mode = Mode ;
2023-01-16 22:26:34 +00:00
2020-04-14 12:14:48 +00:00
} ) ; ( function ( ) {
ace . require ( [ "ace/mode/autohotkey" ] , function ( m ) {
if ( typeof module == "object" && typeof exports == "object" && module ) {
module . exports = m ;
}
} ) ;
} ) ( ) ;