├── .gitignore ├── .vscode └── settings.json ├── packages ├── utilities │ ├── src │ │ ├── string │ │ │ └── index.ts │ │ ├── array │ │ │ ├── index.ts │ │ │ └── repeatArray.ts │ │ ├── io │ │ │ ├── index.ts │ │ │ ├── existsFileSync.ts │ │ │ └── existsFileAsync.ts │ │ ├── predicate │ │ │ ├── index.ts │ │ │ ├── isIntegerLike.ts │ │ │ └── isNumberLike.ts │ │ ├── bitwise │ │ │ ├── index.ts │ │ │ ├── hasFlag.ts │ │ │ ├── onFlag.ts │ │ │ ├── offFlag.ts │ │ │ └── mergeFlags.ts │ │ ├── function │ │ │ ├── index.ts │ │ │ ├── singleton.ts │ │ │ ├── memoize.ts │ │ │ ├── timesAsync.ts │ │ │ └── times.ts │ │ └── index.ts │ ├── eslint.config.js │ ├── tsconfig.json │ ├── package.json │ ├── jest.config.js │ └── test │ │ ├── array │ │ └── repeatArray.test.ts │ │ ├── io │ │ ├── existsFileSync.test.ts │ │ └── existsFileAsync.test.ts │ │ ├── function │ │ ├── times.test.ts │ │ ├── memoize.test.ts │ │ ├── timesAsync.test.ts │ │ └── singleton.test.ts │ │ ├── string │ │ └── dedent.test.ts │ │ └── bitwise │ │ └── common.test.ts ├── autohotkey-utilities │ ├── src │ │ └── index.ts │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ ├── eslint.config.js │ ├── tsconfig.json │ ├── package.json │ └── jest.config.js ├── autohotkey-tmlanguage │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ ├── eslint.config.js │ ├── tsconfig.json │ ├── test │ │ ├── types.ts │ │ ├── autohotkeynext │ │ │ ├── expected │ │ │ │ ├── expression │ │ │ │ │ └── call.ts │ │ │ │ └── statement │ │ │ │ │ └── directive │ │ │ │ │ ├── index.ts │ │ │ │ │ └── #Module.ts │ │ │ └── index.test.ts │ │ ├── autohotkey2 │ │ │ ├── expected │ │ │ │ ├── statement │ │ │ │ │ ├── if.ts │ │ │ │ │ ├── for.ts │ │ │ │ │ ├── jump.ts │ │ │ │ │ └── throw.ts │ │ │ │ ├── declaration │ │ │ │ │ ├── label.ts │ │ │ │ │ ├── class │ │ │ │ │ │ ├── field.ts │ │ │ │ │ │ ├── method.ts │ │ │ │ │ │ ├── head.ts │ │ │ │ │ │ └── property.ts │ │ │ │ │ └── hotstringLabel.ts │ │ │ │ └── expression │ │ │ │ │ ├── array.ts │ │ │ │ │ ├── number.ts │ │ │ │ │ ├── string.ts │ │ │ │ │ └── regexp.ts │ │ │ └── index.test.ts │ │ ├── autohotkeyl │ │ │ ├── expected │ │ │ │ ├── statement │ │ │ │ │ ├── if.ts │ │ │ │ │ ├── for.ts │ │ │ │ │ ├── try.ts │ │ │ │ │ ├── jump.ts │ │ │ │ │ ├── throw.ts │ │ │ │ │ └── directive │ │ │ │ │ │ ├── #NoEnv.ts │ │ │ │ │ │ ├── #If.ts │ │ │ │ │ │ ├── #NoTrayIcon.ts │ │ │ │ │ │ ├── #Persistent.ts │ │ │ │ │ │ ├── #CommentFlag.ts │ │ │ │ │ │ ├── #Delimiter.ts │ │ │ │ │ │ ├── #DerefChar.ts │ │ │ │ │ │ ├── #MaxMem.ts │ │ │ │ │ │ ├── #MenuMaskKey.ts │ │ │ │ │ │ ├── #ErrorStdOut.ts │ │ │ │ │ │ ├── #IfTimeout.ts │ │ │ │ │ │ ├── #LTrim.ts │ │ │ │ │ │ ├── #InputLevel.ts │ │ │ │ │ │ ├── #InstallKeybdHook.ts │ │ │ │ │ │ ├── #InstallMouseHook.ts │ │ │ │ │ │ ├── #KeyHistory.ts │ │ │ │ │ │ ├── #MaxThreads.ts │ │ │ │ │ │ ├── #Requires.ts │ │ │ │ │ │ ├── #WinActivateForce.ts │ │ │ │ │ │ ├── #UseHook.ts │ │ │ │ │ │ ├── #HotkeyInterval.ts │ │ │ │ │ │ ├── #Include.ts │ │ │ │ │ │ ├── #ClipboardTimeout.ts │ │ │ │ │ │ ├── #AllowSameLineComments.ts │ │ │ │ │ │ ├── #MaxThreadsPerHotkey.ts │ │ │ │ │ │ ├── #MaxThreadsBuffer.ts │ │ │ │ │ │ ├── #HotkeyModifierTimeout.ts │ │ │ │ │ │ ├── #MaxHotkeysPerInterval.ts │ │ │ │ │ │ ├── #SingleInstance.ts │ │ │ │ │ │ ├── #IfWinActive.ts │ │ │ │ │ │ └── #Warn.ts │ │ │ │ ├── declaration │ │ │ │ │ ├── label.ts │ │ │ │ │ ├── class │ │ │ │ │ │ ├── field.ts │ │ │ │ │ │ ├── method.ts │ │ │ │ │ │ ├── head.ts │ │ │ │ │ │ ├── property.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── hotstringLabel.ts │ │ │ │ ├── expression │ │ │ │ │ ├── array.ts │ │ │ │ │ ├── number.ts │ │ │ │ │ ├── parenthesized.ts │ │ │ │ │ ├── regexp.ts │ │ │ │ │ └── string.ts │ │ │ │ └── legacy │ │ │ │ │ └── command │ │ │ │ │ ├── RunWait.ts │ │ │ │ │ ├── SendRaw.ts │ │ │ │ │ ├── SendPlay.ts │ │ │ │ │ ├── SendEvent.ts │ │ │ │ │ ├── SendInput.ts │ │ │ │ │ ├── ControlSendRaw.ts │ │ │ │ │ ├── SetNumLockState.ts │ │ │ │ │ ├── SetScrollLockState.ts │ │ │ │ │ ├── Click.ts │ │ │ │ │ ├── Edit.ts │ │ │ │ │ ├── AutoTrim.ts │ │ │ │ │ ├── Send.ts │ │ │ │ │ ├── Reload.ts │ │ │ │ │ ├── EnvUpdate.ts │ │ │ │ │ ├── ListVars.ts │ │ │ │ │ ├── OutputDebug.ts │ │ │ │ │ ├── KeyHistory.ts │ │ │ │ │ ├── ListLines.ts │ │ │ │ │ ├── Sleep.ts │ │ │ │ │ ├── ListHotkeys.ts │ │ │ │ │ ├── FileDelete.ts │ │ │ │ │ ├── FileCreateDir.ts │ │ │ │ │ ├── FileRecycle.ts │ │ │ │ │ ├── SendLevel.ts │ │ │ │ │ ├── SetWorkingDir.ts │ │ │ │ │ ├── WinMinimizeAll.ts │ │ │ │ │ ├── FileEncoding.ts │ │ │ │ │ ├── OnExit.ts │ │ │ │ │ ├── SetWinDelay.ts │ │ │ │ │ ├── DetectHiddenText.ts │ │ │ │ │ ├── SplashTextOff.ts │ │ │ │ │ ├── WinMinimizeAllUndo.ts │ │ │ │ │ ├── DetectHiddenWindows.ts │ │ │ │ │ ├── SetCapsLockState.ts │ │ │ │ │ ├── SetControlDelay.ts │ │ │ │ │ ├── WinGetActiveTitle.ts │ │ │ │ │ ├── SetStoreCapsLockMode.ts │ │ │ │ │ ├── StringCaseSense.ts │ │ │ │ │ ├── FileRecycleEmpty.ts │ │ │ │ │ ├── SetBatchLines.ts │ │ │ │ │ ├── SetDefaultMouseSpeed.ts │ │ │ │ │ ├── SetRegView.ts │ │ │ │ │ ├── EnvSet.ts │ │ │ │ │ ├── SendMode.ts │ │ │ │ │ ├── ClipWait.ts │ │ │ │ │ ├── SetTitleMatchMode.ts │ │ │ │ │ ├── SoundBeep.ts │ │ │ │ │ ├── BlockInput.ts │ │ │ │ │ ├── EnvGet.ts │ │ │ │ │ ├── SetEnv.ts │ │ │ │ │ ├── DriveSpaceFree.ts │ │ │ │ │ ├── UrlDownloadToFile.ts │ │ │ │ │ ├── FileGetAttrib.ts │ │ │ │ │ ├── FileGetVersion.ts │ │ │ │ │ ├── GroupClose.ts │ │ │ │ │ ├── FileRemoveDir.ts │ │ │ │ │ ├── EnvDiv.ts │ │ │ │ │ ├── GroupActivate.ts │ │ │ │ │ ├── SoundPlay.ts │ │ │ │ │ ├── EnvMult.ts │ │ │ │ │ ├── GroupDeactivate.ts │ │ │ │ │ ├── StringLen.ts │ │ │ │ │ ├── Critical.ts │ │ │ │ │ ├── Pause.ts │ │ │ │ │ ├── SetMouseDelay.ts │ │ │ │ │ ├── SoundGetWaveVolume.ts │ │ │ │ │ ├── IniDelete.ts │ │ │ │ │ ├── SoundSetWaveVolume.ts │ │ │ │ │ ├── RegDelete.ts │ │ │ │ │ ├── Random.ts │ │ │ │ │ ├── FileCopyDir.ts │ │ │ │ │ ├── FileInstall.ts │ │ │ │ │ ├── FileCopy.ts │ │ │ │ │ ├── FileMove.ts │ │ │ │ │ ├── FileMoveDir.ts │ │ │ │ │ ├── SetKeyDelay.ts │ │ │ │ │ ├── CoordMode.ts │ │ │ │ │ ├── FileAppend.ts │ │ │ │ │ ├── IniWrite.ts │ │ │ │ │ ├── EnvAdd.ts │ │ │ │ │ ├── EnvSub.ts │ │ │ │ │ ├── TrayTip.ts │ │ │ │ │ ├── ToolTip.ts │ │ │ │ │ ├── WinHide.ts │ │ │ │ │ ├── WinShow.ts │ │ │ │ │ ├── FileReadLine.ts │ │ │ │ │ ├── WinActivate.ts │ │ │ │ │ └── WinMaximize.ts │ │ │ └── index.test.ts │ │ ├── helpers │ │ │ └── definition │ │ │ │ ├── parameter │ │ │ │ ├── $glob.ts │ │ │ │ ├── $path.ts │ │ │ │ ├── $fontName.ts │ │ │ │ ├── $shouldEscapeComma.ts │ │ │ │ ├── $onOffToggle.ts │ │ │ │ ├── $timeunit.ts │ │ │ │ ├── $imagePath.ts │ │ │ │ ├── $controlMoveOptions.ts │ │ │ │ ├── $shouldNumber.ts │ │ │ │ ├── $encoding.ts │ │ │ │ ├── $endKeys.ts │ │ │ │ ├── $color.ts │ │ │ │ ├── $whichButton.ts │ │ │ │ ├── $soundControlType.ts │ │ │ │ ├── $soundComponent.ts │ │ │ │ ├── $menuOptions.ts │ │ │ │ ├── $rest.ts │ │ │ │ ├── $subcommand.ts │ │ │ │ ├── $invalidSubcommand.ts │ │ │ │ ├── $shouldLabel.ts │ │ │ │ └── $matchKeys.ts │ │ │ │ ├── option │ │ │ │ ├── letterOption.ts │ │ │ │ ├── numberOption.ts │ │ │ │ ├── keywordOption.ts │ │ │ │ ├── stringOption.ts │ │ │ │ ├── identifierOption.ts │ │ │ │ ├── rangeOption.ts │ │ │ │ ├── sizeOption.ts │ │ │ │ └── toggleOption.ts │ │ │ │ └── common │ │ │ │ └── invalid.ts │ │ ├── common │ │ │ └── trivia │ │ │ │ ├── multiLineComment.ts │ │ │ │ └── singleLineComment.ts │ │ └── autohotkey │ │ │ └── index.test.ts │ ├── src │ │ ├── autohotkeynext │ │ │ ├── rules │ │ │ │ ├── index.ts │ │ │ │ └── expression │ │ │ │ │ └── function.ts │ │ │ └── patterns.ts │ │ ├── autohotkey2 │ │ │ └── rules │ │ │ │ ├── index.ts │ │ │ │ └── expression │ │ │ │ └── parenthesized.ts │ │ ├── index.ts │ │ ├── autohotkeyl │ │ │ └── rules │ │ │ │ └── index.ts │ │ └── common │ │ │ └── rules │ │ │ ├── statement │ │ │ ├── throw.ts │ │ │ ├── for.ts │ │ │ ├── until.ts │ │ │ ├── try.ts │ │ │ └── while.ts │ │ │ ├── declaration │ │ │ ├── block.ts │ │ │ ├── modifier.ts │ │ │ └── label.ts │ │ │ ├── expression │ │ │ ├── array.ts │ │ │ └── object.ts │ │ │ └── trivia │ │ │ └── multiLine.ts │ ├── jest.config.js │ └── package.json ├── autohotkey-modules │ ├── tsconfig.json │ ├── src │ │ ├── lib │ │ │ └── modules │ │ │ │ ├── error │ │ │ │ └── __Init.ahk │ │ │ │ ├── predicate │ │ │ │ └── __Init.ahk │ │ │ │ ├── function │ │ │ │ ├── functions │ │ │ │ │ ├── noop.ahk │ │ │ │ │ └── invokeCallback.ahk │ │ │ │ └── __Init.ahk │ │ │ │ ├── collection │ │ │ │ ├── classes │ │ │ │ │ └── CircularInfomation.ahk │ │ │ │ ├── functions │ │ │ │ │ ├── sizeOf.ahk │ │ │ │ │ └── getIn.ahk │ │ │ │ └── __Init.ahk │ │ │ │ ├── test │ │ │ │ └── functions │ │ │ │ │ ├── runTestBy.ahk │ │ │ │ │ ├── describe.ahk │ │ │ │ │ ├── afterAll.ahk │ │ │ │ │ ├── afterEach.ahk │ │ │ │ │ ├── beforeAll.ahk │ │ │ │ │ ├── beforeEach.ahk │ │ │ │ │ ├── runAllTest.ahk │ │ │ │ │ ├── reportSummary.ahk │ │ │ │ │ ├── test.ahk │ │ │ │ │ ├── reportAssertions.ahk │ │ │ │ │ └── reportTestCase.ahk │ │ │ │ └── hotkey │ │ │ │ ├── functions │ │ │ │ ├── isHotkeyName.ahk │ │ │ │ ├── isCustomCombiName.ahk │ │ │ │ ├── getHotkeyOptions.ahk │ │ │ │ └── getHotkeyOptionsText.ahk │ │ │ │ ├── inner.ahk │ │ │ │ └── __Init.ahk │ │ ├── .config.ahk │ │ └── index.test.ahk │ ├── jest.config.js │ ├── package.json │ ├── test │ │ ├── config.ts │ │ └── index.test.ts │ └── .vscode │ │ └── launch.json └── eslint-style-rules │ ├── src │ └── index.js │ ├── eslint.config.js │ └── package.json ├── editors └── vscode │ └── vscode-autohotkey-devtools │ ├── .gitignore │ ├── .vscode │ ├── settings.json │ ├── tasks.json │ └── launch.json │ ├── eslint.config.js │ ├── icon.png │ ├── src │ ├── extension.ts │ └── browser │ │ └── extension.ts │ ├── tsconfig.json │ ├── .vscodeignore │ ├── scripts │ ├── bin │ │ ├── clean.ts │ │ ├── prepackage.ts │ │ ├── build.ts │ │ └── watch.ts │ └── helpers │ │ └── clean.ts │ └── jest.config.js ├── eslint.config.js ├── jest.config.js └── autohotkey-devtools.code-workspace /.gitignore: -------------------------------------------------------------------------------- 1 | assets/icon/icon.png 2 | node_modules/ -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "jest.enable": false 3 | } -------------------------------------------------------------------------------- /packages/utilities/src/string/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dedent'; 2 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.vsix -------------------------------------------------------------------------------- /packages/utilities/src/array/index.ts: -------------------------------------------------------------------------------- 1 | export * from './repeatArray'; 2 | -------------------------------------------------------------------------------- /packages/autohotkey-utilities/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as version from './version'; 2 | -------------------------------------------------------------------------------- /packages/utilities/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../../eslint.config'); 2 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "jest.runMode": "on-demand" 3 | } -------------------------------------------------------------------------------- /packages/autohotkey-utilities/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "jest.runMode": "on-demand" 3 | } -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../../eslint.config'); 2 | -------------------------------------------------------------------------------- /packages/autohotkey-utilities/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../../eslint.config'); 2 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "jest.runMode": "on-demand" 3 | } -------------------------------------------------------------------------------- /packages/utilities/src/io/index.ts: -------------------------------------------------------------------------------- 1 | export * from './existsFileAsync'; 2 | export * from './existsFileSync'; 3 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../../../eslint.config'); 2 | -------------------------------------------------------------------------------- /packages/utilities/src/predicate/index.ts: -------------------------------------------------------------------------------- 1 | export * from './isIntegerLike'; 2 | export * from './isNumberLike'; 3 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": [ 4 | "test/**/*", 5 | "*.config.js" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/utilities/src/bitwise/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hasFlag'; 2 | export * from './mergeFlags'; 3 | export * from './offFlag'; 4 | export * from './onFlag'; 5 | -------------------------------------------------------------------------------- /packages/utilities/src/function/index.ts: -------------------------------------------------------------------------------- 1 | export * from './memoize'; 2 | export * from './singleton'; 3 | export * from './times'; 4 | export * from './timesAsync'; 5 | -------------------------------------------------------------------------------- /packages/utilities/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": [ 4 | "src/**/*", 5 | "test/**/*", 6 | "*.config.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zero-plusplus/autohotkey-devtools/HEAD/editors/vscode/vscode-autohotkey-devtools/icon.png -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/error/__Init.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | export import './lib/modules/error/functions/writeError' { writeError } 4 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/predicate/__Init.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | export import './lib/modules/predicate/functions/equals' { equals } 4 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | 3 | export function activate(context: vscode.ExtensionContext): void { 4 | } 5 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": [ 4 | "src/**/*", 5 | "test/**/*", 6 | "*.config.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/autohotkey-utilities/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": [ 4 | "src/**/*", 5 | "test/**/*", 6 | "*.config.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/eslint-style-rules/src/index.js: -------------------------------------------------------------------------------- 1 | const js = require('./rules/js.js'); 2 | const ts = require('./rules/ts.js'); 3 | 4 | module.exports = { 5 | js, 6 | ts, 7 | }; 8 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | const rules = require('@zero-plusplus/eslint-style-rules'); 2 | 3 | module.exports = [ 4 | ...rules.js.config(), 5 | ...rules.ts.config(__dirname), 6 | ]; 7 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/src/browser/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | 3 | export function activate(context: vscode.ExtensionContext): void { 4 | } 5 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/test/types.ts: -------------------------------------------------------------------------------- 1 | export interface ParsedResult { 2 | text: string; 3 | scopes?: string; 4 | } 5 | export type ExpectedTestData = [ string, ParsedResult[] ]; 6 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | }; 7 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "include": [ 4 | "scripts/**/*.ts", 5 | "src/**/*.ts", 6 | "*.config.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /packages/eslint-style-rules/eslint.config.js: -------------------------------------------------------------------------------- 1 | const rules = require('@zero-plusplus/eslint-style-rules'); 2 | 3 | module.exports = [ 4 | ...rules.js.config(), 5 | ...rules.ts.config(__dirname), 6 | ]; 7 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/.vscodeignore: -------------------------------------------------------------------------------- 1 | ../ 2 | ../../ 3 | ../../../ 4 | .vscode/ 5 | build/demo 6 | scripts/ 7 | src/ 8 | .gitignore 9 | *.config.js 10 | tsconfig.json 11 | *.vsix 12 | -------------------------------------------------------------------------------- /packages/utilities/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './array'; 2 | export * from './bitwise'; 3 | export * from './function'; 4 | export * from './io'; 5 | export * from './predicate'; 6 | export * from './string'; 7 | -------------------------------------------------------------------------------- /packages/utilities/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@zero-plusplus/utilities", 3 | "version": "0.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "npx jest" 7 | }, 8 | "private": true 9 | } 10 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | }; 7 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/scripts/bin/clean.ts: -------------------------------------------------------------------------------- 1 | import { cleanBuild } from '../helpers/clean'; 2 | 3 | // eslint-disable-next-line jest/require-hook 4 | (async(): Promise => { 5 | await cleanBuild(); 6 | })(); 7 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@zero-plusplus/autohotkey-modules", 3 | "version": "0.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "npx jest" 7 | }, 8 | "private": true 9 | } 10 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/function/functions/noop.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | /** 4 | * no-operation function. 5 | * @param {unknown[]} * 6 | * @return {blank} 7 | */ 8 | export noop(*) { 9 | } 10 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/src/autohotkeynext/rules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './declaration/export'; 2 | export * from './declaration/import'; 3 | export * from './declaration/typedAssignment'; 4 | export * from './expression/function'; 5 | -------------------------------------------------------------------------------- /packages/autohotkey-utilities/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@zero-plusplus/autohotkey-utilities", 3 | "version": "0.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "npx jest" 7 | }, 8 | "private": true 9 | } 10 | -------------------------------------------------------------------------------- /packages/utilities/jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | 7 | moduleDirectories: [ '../../node_modules' ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/src/autohotkey2/rules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './expression/dereference'; 2 | export * from './expression/object'; 3 | export * from './expression/parenthesized'; 4 | export * from './statement/directive'; 5 | export * from './statement/loop'; 6 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | 7 | moduleDirectories: [ '../../node_modules' ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/autohotkey-utilities/jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | 7 | moduleDirectories: [ '../../node_modules' ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/utilities/src/bitwise/hasFlag.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Checks if the target has flags included. 3 | * @param target 4 | * @param flag 5 | * @returns 6 | */ 7 | export function hasFlag(target: number, flag: number): boolean { 8 | return 0 < (target & flag); 9 | } 10 | -------------------------------------------------------------------------------- /packages/utilities/src/bitwise/onFlag.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Turns on specified flags on the target and returns them. 3 | * @param target 4 | * @param flag 5 | * @returns 6 | */ 7 | export function onFlag(target: number, flag: number): number { 8 | return target | flag; 9 | } 10 | -------------------------------------------------------------------------------- /packages/utilities/src/bitwise/offFlag.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Turns off specified flags on the target and returns them. 3 | * @param target 4 | * @param flag 5 | * @returns 6 | */ 7 | export function offFlag(target: number, flag: number): number { 8 | return target & ~flag; 9 | } 10 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/jest.config.js: -------------------------------------------------------------------------------- 1 | const { createDefaultPreset } = require('ts-jest'); 2 | 3 | /** @type {import('ts-jest').JestConfigWithTsJest} **/ 4 | module.exports = { 5 | ...createDefaultPreset(), 6 | 7 | moduleDirectories: [ '../../node_modules' ], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as markdown from './__injection__/markdown'; 2 | export * as autohotkey from './autohotkey'; 3 | export * as autohotkey2 from './autohotkey2'; 4 | export * as autohotkeyl from './autohotkeyl'; 5 | export * as autohotkeynext from './autohotkeynext'; 6 | -------------------------------------------------------------------------------- /packages/autohotkey-tmlanguage/test/autohotkeynext/expected/expression/call.ts: -------------------------------------------------------------------------------- 1 | import type { ScopeName } from '../../../../src/tmlanguage'; 2 | import type { ExpectedTestData } from '../../../types'; 3 | 4 | export function createCallExpressionExpectedData(scopeName: ScopeName): ExpectedTestData[] { 5 | return []; 6 | } 7 | -------------------------------------------------------------------------------- /packages/utilities/test/array/repeatArray.test.ts: -------------------------------------------------------------------------------- 1 | import { repeatArray } from '../../src'; 2 | 3 | describe('repeatArray', () => { 4 | test('pass', () => { 5 | expect(repeatArray(2, [ 1 ])).toStrictEqual([ 1, 1 ]); 6 | expect(repeatArray(2, [ 1, 2, 3 ])).toStrictEqual([ 1, 2, 3, 1, 2, 3 ]); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/collection/classes/CircularInfomation.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | export class CircularInfomation extends Error { 4 | __NEW(value) { 5 | super.__NEW('circular reference occurred.') 6 | 7 | this.defineProp('value', { get: (*) => value }) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/test/functions/runTestBy.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | #Warn All, StdOut 3 | 4 | import './lib/modules/test/inner' { CONTEXT } 5 | 6 | /** 7 | * @param {(context: TestContext) => void} callback 8 | */ 9 | export runTestBy(callback) { 10 | callback(CONTEXT) 11 | } 12 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/collection/functions/sizeOf.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | /** 4 | * Gets number of members/elements of an object. 5 | * @param {object} obj 6 | * @return {number} 7 | */ 8 | export sizeOf(obj) { 9 | return obj.length ?? obj.count ?? ObjOwnPropCount(obj) 10 | } 11 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/function/__Init.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | export import './lib/modules/function/classes/CallbackFunc' { CallbackFunc } 4 | export import './lib/modules/function/functions/invokeCallback' { invokeCallback } 5 | export import './lib/modules/function/functions/noop' { noop } 6 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/test/config.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | 3 | export const runtimePath: string = path.resolve(process.env['ProgramFiles']!, 'AutoHotkey', 'v2.1-alpha', 'AutoHotkey64.exe'); 4 | export const projectDir: string = path.resolve(__dirname, '..'); 5 | export const sourceDir: string = path.resolve(projectDir, 'src'); 6 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/hotkey/functions/isHotkeyName.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | import './lib/modules/hotkey/inner' { hotkeyRegExp } 4 | 5 | /** 6 | * Checks if it is a generic hotkey name such as `^+v`. 7 | * @return {boolean} 8 | */ 9 | export isHotkeyName(keyName) { 10 | return !!(keyName ~= hotkeyRegExp) 11 | } 12 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/scripts/bin/prepackage.ts: -------------------------------------------------------------------------------- 1 | import { buildOptions } from '../config'; 2 | import { build } from '../helpers/build'; 3 | import { cleanBuild } from '../helpers/clean'; 4 | 5 | // eslint-disable-next-line jest/require-hook 6 | (async(): Promise => { 7 | await cleanBuild(); 8 | await build(buildOptions); 9 | })(); 10 | -------------------------------------------------------------------------------- /packages/utilities/src/bitwise/mergeFlags.ts: -------------------------------------------------------------------------------- 1 | import { onFlag } from './onFlag'; 2 | 3 | /** 4 | * Merges the specified flags and returns them. 5 | * @param flags 6 | * @returns 7 | */ 8 | export function mergeFlags(...flags: number[]): number { 9 | return flags.reduce((prev, current) => { 10 | return onFlag(prev, current); 11 | }, 0); 12 | } 13 | -------------------------------------------------------------------------------- /editors/vscode/vscode-autohotkey-devtools/scripts/bin/build.ts: -------------------------------------------------------------------------------- 1 | import { debugBuildOptions } from '../config'; 2 | import { build } from '../helpers/build'; 3 | import { cleanBuild } from '../helpers/clean'; 4 | 5 | // eslint-disable-next-line jest/require-hook 6 | (async(): Promise => { 7 | await cleanBuild(); 8 | await build(debugBuildOptions); 9 | })(); 10 | -------------------------------------------------------------------------------- /packages/utilities/test/io/existsFileSync.test.ts: -------------------------------------------------------------------------------- 1 | import { 2 | describe, 3 | test, 4 | } from '@jest/globals'; 5 | import { existsFileSync } from '../../src'; 6 | 7 | describe('existsFileSync', () => { 8 | test('existsFileSync', () => { 9 | expect(existsFileSync(__filename)).toBeTruthy(); 10 | expect(existsFileSync(__dirname)).toBeFalsy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/autohotkey-modules/src/lib/modules/hotkey/inner.ahk: -------------------------------------------------------------------------------- 1 | #Requires AutoHotkey v2.1- 2 | 3 | ; https://www.autohotkey.com/docs/v2/Hotkeys.htm#Symbols 4 | export hotkeyOptionsRegExp := 'i)^(?