├── .gitattributes ├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── extension.js ├── images ├── j-logo.png └── syntaxhilite.png ├── language-configuration.json ├── package-lock.json ├── package.json ├── src └── extension.ts ├── syntaxes ├── j.tmLanguage.json └── j.tmLanguage.yaml ├── tsconfig.json ├── user_settings_j.json └── vsc-extension-quickstart.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.{cmd,[cC][mM][dD]} text eol=crlf 3 | *.{bat,[bB][aA][tT]} text eol=crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vsix 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ], 15 | "outFiles": [ 16 | "${workspaceFolder}/extension.js" 17 | ], 18 | "preLaunchTask": "npm: compile" 19 | 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "typescript", 6 | "tsconfig": "tsconfig.json", 7 | "problemMatcher": [ 8 | "$tsc" 9 | ], 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | }, 14 | "label": "tsc: build - tsconfig.json" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | src/** 3 | .gitignore 4 | .gitattributes 5 | vsc-extension-quickstart.md 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the J VSCode extension will be documented in this file. 3 | ## [0.9.6] - 2024-01-28 4 | ### Enhancement 5 | - Add command palate command to open NuVoc in browser (@semperos) 6 | ## [0.9.5] - 2023-01-05 7 | ### Fix 8 | - Fix regression not clearing Terminal cmdline before sending text to it 9 | ## [0.9.4] - 2022-12-31 10 | ### Enhancement 11 | - Save scripts before loading them to J terminal 12 | - Add syntax highlighting support for `/..`, `t.`, & `T.` 13 | ## [0.9.3] - 2022-12-29 14 | ### Fix 15 | - Fix regression in detecting start of multiline definitions 16 | ## [0.9.2] - 2022-12-28 17 | ### Enhancement 18 | - Supports execution of multi-line direct definitions 19 | ## [0.9.1] - 2022-12-28 20 | ### Refactor 21 | - getting/executing text in terminal 22 | ## [0.9.0] - 2022-12-28 23 | ### Enhancement 24 | - Streamlined terminal start behaviour 25 | - Combined Execute Selection and Execute Line commands 26 | ### Fixed 27 | - Fixed regression in advancing to next non-blank line 28 | ## [0.8.1] - 2022-12-27 29 | ### Fixed 30 | - Fix multiline definition handling 31 | - Tidy up build infrastructure 32 | 33 | ## [0.8.0] - 2022-12-27 34 | ### Chore 35 | - Convert JavaScript to TypeScript 36 | ## [0.7.4] - 2021-04-26 37 | 38 | ### Fixed 39 | - Sending text to J Windows Terminal 40 | 41 | ## [0.7.3] - 2021-04-19 42 | 43 | ### Fixed 44 | - Clear Terminal cmdline before sending text to it 45 | ## [0.7.2] - 2021-02-12 46 | 47 | ### Added 48 | - Highlight brackets again 49 | 50 | ## [0.7.1] - 2021-02-23 51 | 52 | ### Changed 53 | - Fix to numeric highlighting 54 | 55 | ## [0.7.0] - 2020-12-11 56 | 57 | ### Changed 58 | - Improved numeric highlighting 59 | - Updated valid primitives for language changes 60 | 61 | ## [0.6.0] - 2020-11-20 62 | 63 | ### Added 64 | - Handle Direct Definition with/without control info 65 | - Key-binding to start JConsole terminal 66 | 67 | ### Changed 68 | - The JConsole Terminal no longer automatically restarts 69 | - Fixed closing of Direct Definition for nouns (J9.02) 70 | 71 | ## [0.5.2] - 2020-10-28 72 | 73 | ### Added 74 | - Support for Direct Definition 75 | 76 | ### Changed 77 | - Simplified reference to conjunctions : and . with or without modifiers 78 | 79 | ## [0.5.1] - 2020-10-16 80 | 81 | ### Changed 82 | - Fixed missing comment in language syntax definition 83 | - Fixed toggling of multi-line comments 84 | - Fixed auto-closing of single-quotes within comments and strings 85 | 86 | ## [0.5.0] - 2020-10-11 87 | ### Added 88 | - Support for explicit string definitions 89 | - Distinguished verb and adverb/conj explicit definitions 90 | 91 | ### Changed 92 | - Fixed scope of single line strings 93 | - Fixed capture of NB. at start of comment 94 | 95 | ## [0.4.0] 96 | ## [0.3.0] 97 | - Narrow scope of keybindings so only apply to J files 98 | - Use YAML grammar as reference 99 | 100 | ## [0.2.1] 101 | - Minor change to highlighing and syntax file naming 102 | 103 | ## [0.2.0] 104 | - Added support for J terminal/console 105 | 106 | ## [0.1.0] 107 | - Added suggested additions for User Settings to highlight more language features 108 | 109 | ## [0.0.1] - 2018-01-31 110 | - Initial release 111 | - Added grammar for syntax highlighting 112 | 113 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Ric Sherlock. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # J VS Code extension 2 | 3 | This [VS Code] extension provides support for the [J programming language]. 4 | 5 | ## Features 6 | 7 | The extension currently provides syntax highlighting and interaction with the Jconsole. 8 | 9 | ![syntax highlighting](images/syntaxhilite.png) 10 | >The above code snippet uses the Monokai color theme with some tweaks discussed below. 11 | 12 | ## Requirements 13 | 14 | Install the J extension from Extensions Marketplace within VS Code or from the [VS Code Marketplace]. 15 | In the VS Code extensions view, search for ``j`` or ``language-j`` in the marketplace 16 | search box. 17 | 18 | To integrate with your installed Jconsole, make an entry for ``j.executablePath`` in VS Code User Settings (`Ctrl`+`,`) that points to the Jconsole executable, for example: ``"j.executablePath": "/home/elmo/j901/bin/jconsole"`` or on Windows: 19 | ``"j.executablePath": ""C:\\Program Files\\j901\\bin\\jconsole.exe"`` 20 | 21 | To distinguish some of the J's additional language features (e.g. verbs, adverbs, conjunctions) that are not commonly catered for in color themes, a number of suggested additions for your User Settings are provided in the ``user_settings_j.json`` file. The colors used were chosen to work with the Monokai theme. 22 | 23 | ## Integrated Terminal/Console 24 | 25 | When one of the ``Execute`` or ``Load`` J commands from the Command Palette (see table) is run from an `.ijs` script, the command will be executed in the most recently active Jconsole terminal. If no Jconsole terminal is currently running, then a new one will be created first. 26 | 27 | When an ``Execute`` command is run and there is no selection, then if the line the cursor is on is the first line of a multi-line definition (explicit or direct definition) the entire multi-line definition will be run. Otherwise just the entire line will be executed in the terminal. If there is a selection (within a line or over multiple lines), then the selected text will be executed in the terminal. 28 | 29 | When a ``Load Script`` command is run, the script will be saved to disk prior to loading it in the terminal. 30 | 31 | | Command Palette | Description | 32 | | ------------------------------------ | ---------------------------------------------- | 33 | | J: Execute Line/Selecton and Advance | Execute and advance to the next non-blank line | 34 | | J: Execute Line/Selection | Execute without advancing | 35 | | J: Load Script | load the script file | 36 | | J: Load and Display Script | load the script file with display | 37 | | J: Create JConsole Terminal | Manually start a new Jconsole terminal | 38 | 39 | 40 | ## Release Notes 41 | 42 | See the [Change Log](CHANGELOG.md) for release notes. 43 | 44 | ----------------------------------------------------------------------------------------------------------- 45 | [VS Code]: https://code.visualstudio.com 46 | [J programming language]: https://www.jsoftware.com 47 | [VS Code Marketplace]: https://marketplace.visualstudio.com/items?itemName=tikkanz.language-j 48 | -------------------------------------------------------------------------------- /extension.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.deactivate = exports.activate = void 0; 4 | const vscode_1 = require("vscode"); 5 | function activate(context) { 6 | const cmds = [ 7 | ['language-j.startTerminal', startTerminal], 8 | ['language-j.loadScript', loadScript], 9 | ['language-j.loadDisplayScript', loadDisplayScript], 10 | ['language-j.execute', execute], 11 | ['language-j.executeAdvance', executeAdvance], 12 | ['language-j.openNuVoc', openNuVoc] 13 | ]; 14 | for (const [n, f] of cmds) { 15 | vscode_1.commands.registerTextEditorCommand(n, f); 16 | } 17 | } 18 | exports.activate = activate; 19 | let terminal = null; 20 | let isWinExe; 21 | function deactivate(context) { 22 | if (terminal != null) { 23 | terminal.dispose(); 24 | } 25 | } 26 | exports.deactivate = deactivate; 27 | function createTerminal() { 28 | const config = vscode_1.workspace.getConfiguration('j'); 29 | isWinExe = config.executablePath.endsWith('.exe'); 30 | return vscode_1.window.createTerminal({ 31 | name: "Jconsole", shellPath: config.executablePath 32 | }); 33 | } 34 | vscode_1.window.onDidChangeActiveTerminal(nextTerminal => { 35 | if (nextTerminal === undefined) { 36 | return; 37 | } 38 | if (nextTerminal.name == "Jconsole") { 39 | terminal = nextTerminal; 40 | } 41 | else { 42 | const jTerminals = vscode_1.window.terminals.filter(t => t.name == "Jconsole"); 43 | terminal = jTerminals.length > 0 ? jTerminals[0] : null; 44 | } 45 | }); 46 | function getTerminal() { 47 | if (terminal === null || terminal.exitStatus != undefined) { 48 | terminal = createTerminal(); 49 | } 50 | terminal.show(true); 51 | } 52 | function startTerminal() { 53 | terminal = createTerminal(); 54 | terminal.show(false); 55 | } 56 | function loadScript(editor) { 57 | editor.document.save(); 58 | sendTerminalText(`load '${editor.document.fileName}'`); 59 | } 60 | function loadDisplayScript(editor) { 61 | editor.document.save(); 62 | sendTerminalText(`loadd '${editor.document.fileName}'`); 63 | } 64 | function execute(editor) { 65 | _execute(editor); 66 | } 67 | function executeAdvance(editor) { 68 | let endPosition = _execute(editor); 69 | let offset = getNextNonBlankLineOffset(editor, endPosition); 70 | vscode_1.commands.executeCommand('cursorMove', { 71 | to: "down", 72 | by: "wrappedLine", 73 | value: offset 74 | }); 75 | vscode_1.commands.executeCommand("cursorMove", { 76 | to: "wrappedLineEnd" 77 | }); 78 | } 79 | function _execute(editor) { 80 | let [text, endPosition] = getExecutionText(editor); 81 | sendTerminalText(text); 82 | return endPosition; 83 | } 84 | function getExecutionText(editor) { 85 | if (!editor.selection.isEmpty) { 86 | const text = editor.document.getText(editor.selection); 87 | return [text, editor.selection.end]; 88 | } 89 | else { 90 | let lineIndex = editor.selection.active.line; 91 | let text = getLineText(editor, lineIndex); 92 | if (!isMultilineStart(text)) { 93 | return [text, editor.selection.active]; 94 | } 95 | text = ""; 96 | while (lineIndex < editor.document.lineCount) { 97 | let nextLine = getLineText(editor, lineIndex); 98 | text += `\n${nextLine}`; 99 | if (isMultilineEnd(nextLine)) { 100 | return [text, new vscode_1.Position(lineIndex, nextLine.length)]; 101 | } 102 | lineIndex++; 103 | } 104 | throw new Error("Incomplete multiline definition!"); 105 | } 106 | } 107 | function isMultilineStart(text) { 108 | const regex = /(?=6.9.0" 30 | } 31 | }, 32 | "node_modules/@babel/helper-validator-identifier": { 33 | "version": "7.19.1", 34 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 35 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", 36 | "dev": true, 37 | "engines": { 38 | "node": ">=6.9.0" 39 | } 40 | }, 41 | "node_modules/@babel/highlight": { 42 | "version": "7.18.6", 43 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", 44 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 45 | "dev": true, 46 | "dependencies": { 47 | "@babel/helper-validator-identifier": "^7.18.6", 48 | "chalk": "^2.0.0", 49 | "js-tokens": "^4.0.0" 50 | }, 51 | "engines": { 52 | "node": ">=6.9.0" 53 | } 54 | }, 55 | "node_modules/@types/node": { 56 | "version": "8.10.66", 57 | "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", 58 | "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", 59 | "dev": true 60 | }, 61 | "node_modules/@types/vscode": { 62 | "version": "1.74.0", 63 | "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.74.0.tgz", 64 | "integrity": "sha512-LyeCIU3jb9d38w0MXFwta9r0Jx23ugujkAxdwLTNCyspdZTKUc43t7ppPbCiPoQ/Ivd/pnDFZrb4hWd45wrsgA==", 65 | "dev": true 66 | }, 67 | "node_modules/ansi-styles": { 68 | "version": "3.2.1", 69 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 70 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 71 | "dev": true, 72 | "dependencies": { 73 | "color-convert": "^1.9.0" 74 | }, 75 | "engines": { 76 | "node": ">=4" 77 | } 78 | }, 79 | "node_modules/argparse": { 80 | "version": "1.0.10", 81 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 82 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 83 | "dev": true, 84 | "dependencies": { 85 | "sprintf-js": "~1.0.2" 86 | } 87 | }, 88 | "node_modules/balanced-match": { 89 | "version": "1.0.2", 90 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 91 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 92 | "dev": true 93 | }, 94 | "node_modules/brace-expansion": { 95 | "version": "1.1.11", 96 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 97 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 98 | "dev": true, 99 | "dependencies": { 100 | "balanced-match": "^1.0.0", 101 | "concat-map": "0.0.1" 102 | } 103 | }, 104 | "node_modules/builtin-modules": { 105 | "version": "1.1.1", 106 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 107 | "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", 108 | "dev": true, 109 | "engines": { 110 | "node": ">=0.10.0" 111 | } 112 | }, 113 | "node_modules/chalk": { 114 | "version": "2.4.2", 115 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 116 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 117 | "dev": true, 118 | "dependencies": { 119 | "ansi-styles": "^3.2.1", 120 | "escape-string-regexp": "^1.0.5", 121 | "supports-color": "^5.3.0" 122 | }, 123 | "engines": { 124 | "node": ">=4" 125 | } 126 | }, 127 | "node_modules/color-convert": { 128 | "version": "1.9.3", 129 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 130 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 131 | "dev": true, 132 | "dependencies": { 133 | "color-name": "1.1.3" 134 | } 135 | }, 136 | "node_modules/color-name": { 137 | "version": "1.1.3", 138 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 139 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 140 | "dev": true 141 | }, 142 | "node_modules/commander": { 143 | "version": "2.20.3", 144 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 145 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 146 | "dev": true 147 | }, 148 | "node_modules/concat-map": { 149 | "version": "0.0.1", 150 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 151 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 152 | "dev": true 153 | }, 154 | "node_modules/diff": { 155 | "version": "4.0.2", 156 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 157 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 158 | "dev": true, 159 | "engines": { 160 | "node": ">=0.3.1" 161 | } 162 | }, 163 | "node_modules/escape-string-regexp": { 164 | "version": "1.0.5", 165 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 166 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 167 | "dev": true, 168 | "engines": { 169 | "node": ">=0.8.0" 170 | } 171 | }, 172 | "node_modules/esprima": { 173 | "version": "4.0.1", 174 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 175 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 176 | "dev": true, 177 | "bin": { 178 | "esparse": "bin/esparse.js", 179 | "esvalidate": "bin/esvalidate.js" 180 | }, 181 | "engines": { 182 | "node": ">=4" 183 | } 184 | }, 185 | "node_modules/fs.realpath": { 186 | "version": "1.0.0", 187 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 188 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 189 | "dev": true 190 | }, 191 | "node_modules/function-bind": { 192 | "version": "1.1.1", 193 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 194 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 195 | "dev": true 196 | }, 197 | "node_modules/glob": { 198 | "version": "7.2.3", 199 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 200 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 201 | "dev": true, 202 | "dependencies": { 203 | "fs.realpath": "^1.0.0", 204 | "inflight": "^1.0.4", 205 | "inherits": "2", 206 | "minimatch": "^3.1.1", 207 | "once": "^1.3.0", 208 | "path-is-absolute": "^1.0.0" 209 | }, 210 | "engines": { 211 | "node": "*" 212 | }, 213 | "funding": { 214 | "url": "https://github.com/sponsors/isaacs" 215 | } 216 | }, 217 | "node_modules/has": { 218 | "version": "1.0.3", 219 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 220 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 221 | "dev": true, 222 | "dependencies": { 223 | "function-bind": "^1.1.1" 224 | }, 225 | "engines": { 226 | "node": ">= 0.4.0" 227 | } 228 | }, 229 | "node_modules/has-flag": { 230 | "version": "3.0.0", 231 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 232 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 233 | "dev": true, 234 | "engines": { 235 | "node": ">=4" 236 | } 237 | }, 238 | "node_modules/inflight": { 239 | "version": "1.0.6", 240 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 241 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 242 | "dev": true, 243 | "dependencies": { 244 | "once": "^1.3.0", 245 | "wrappy": "1" 246 | } 247 | }, 248 | "node_modules/inherits": { 249 | "version": "2.0.4", 250 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 251 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 252 | "dev": true 253 | }, 254 | "node_modules/is-core-module": { 255 | "version": "2.11.0", 256 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", 257 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", 258 | "dev": true, 259 | "dependencies": { 260 | "has": "^1.0.3" 261 | }, 262 | "funding": { 263 | "url": "https://github.com/sponsors/ljharb" 264 | } 265 | }, 266 | "node_modules/js-tokens": { 267 | "version": "4.0.0", 268 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 269 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 270 | "dev": true 271 | }, 272 | "node_modules/js-yaml": { 273 | "version": "3.14.1", 274 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 275 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 276 | "dev": true, 277 | "dependencies": { 278 | "argparse": "^1.0.7", 279 | "esprima": "^4.0.0" 280 | }, 281 | "bin": { 282 | "js-yaml": "bin/js-yaml.js" 283 | } 284 | }, 285 | "node_modules/minimatch": { 286 | "version": "3.1.2", 287 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 288 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 289 | "dev": true, 290 | "dependencies": { 291 | "brace-expansion": "^1.1.7" 292 | }, 293 | "engines": { 294 | "node": "*" 295 | } 296 | }, 297 | "node_modules/minimist": { 298 | "version": "1.2.7", 299 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", 300 | "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", 301 | "dev": true, 302 | "funding": { 303 | "url": "https://github.com/sponsors/ljharb" 304 | } 305 | }, 306 | "node_modules/mkdirp": { 307 | "version": "0.5.6", 308 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 309 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 310 | "dev": true, 311 | "dependencies": { 312 | "minimist": "^1.2.6" 313 | }, 314 | "bin": { 315 | "mkdirp": "bin/cmd.js" 316 | } 317 | }, 318 | "node_modules/once": { 319 | "version": "1.4.0", 320 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 321 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 322 | "dev": true, 323 | "dependencies": { 324 | "wrappy": "1" 325 | } 326 | }, 327 | "node_modules/path-is-absolute": { 328 | "version": "1.0.1", 329 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 330 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 331 | "dev": true, 332 | "engines": { 333 | "node": ">=0.10.0" 334 | } 335 | }, 336 | "node_modules/path-parse": { 337 | "version": "1.0.7", 338 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 339 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 340 | "dev": true 341 | }, 342 | "node_modules/resolve": { 343 | "version": "1.22.1", 344 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 345 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 346 | "dev": true, 347 | "dependencies": { 348 | "is-core-module": "^2.9.0", 349 | "path-parse": "^1.0.7", 350 | "supports-preserve-symlinks-flag": "^1.0.0" 351 | }, 352 | "bin": { 353 | "resolve": "bin/resolve" 354 | }, 355 | "funding": { 356 | "url": "https://github.com/sponsors/ljharb" 357 | } 358 | }, 359 | "node_modules/semver": { 360 | "version": "5.7.2", 361 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 362 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 363 | "dev": true, 364 | "bin": { 365 | "semver": "bin/semver" 366 | } 367 | }, 368 | "node_modules/sprintf-js": { 369 | "version": "1.0.3", 370 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 371 | "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", 372 | "dev": true 373 | }, 374 | "node_modules/supports-color": { 375 | "version": "5.5.0", 376 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 377 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 378 | "dev": true, 379 | "dependencies": { 380 | "has-flag": "^3.0.0" 381 | }, 382 | "engines": { 383 | "node": ">=4" 384 | } 385 | }, 386 | "node_modules/supports-preserve-symlinks-flag": { 387 | "version": "1.0.0", 388 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 389 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 390 | "dev": true, 391 | "engines": { 392 | "node": ">= 0.4" 393 | }, 394 | "funding": { 395 | "url": "https://github.com/sponsors/ljharb" 396 | } 397 | }, 398 | "node_modules/tslib": { 399 | "version": "1.14.1", 400 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 401 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 402 | "dev": true 403 | }, 404 | "node_modules/tslint": { 405 | "version": "5.20.1", 406 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", 407 | "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", 408 | "dev": true, 409 | "dependencies": { 410 | "@babel/code-frame": "^7.0.0", 411 | "builtin-modules": "^1.1.1", 412 | "chalk": "^2.3.0", 413 | "commander": "^2.12.1", 414 | "diff": "^4.0.1", 415 | "glob": "^7.1.1", 416 | "js-yaml": "^3.13.1", 417 | "minimatch": "^3.0.4", 418 | "mkdirp": "^0.5.1", 419 | "resolve": "^1.3.2", 420 | "semver": "^5.3.0", 421 | "tslib": "^1.8.0", 422 | "tsutils": "^2.29.0" 423 | }, 424 | "bin": { 425 | "tslint": "bin/tslint" 426 | }, 427 | "engines": { 428 | "node": ">=4.8.0" 429 | }, 430 | "peerDependencies": { 431 | "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" 432 | } 433 | }, 434 | "node_modules/tsutils": { 435 | "version": "2.29.0", 436 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 437 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", 438 | "dev": true, 439 | "dependencies": { 440 | "tslib": "^1.8.1" 441 | }, 442 | "peerDependencies": { 443 | "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" 444 | } 445 | }, 446 | "node_modules/typescript": { 447 | "version": "4.9.4", 448 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", 449 | "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", 450 | "dev": true, 451 | "bin": { 452 | "tsc": "bin/tsc", 453 | "tsserver": "bin/tsserver" 454 | }, 455 | "engines": { 456 | "node": ">=4.2.0" 457 | } 458 | }, 459 | "node_modules/wrappy": { 460 | "version": "1.0.2", 461 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 462 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 463 | "dev": true 464 | } 465 | }, 466 | "dependencies": { 467 | "@babel/code-frame": { 468 | "version": "7.18.6", 469 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", 470 | "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", 471 | "dev": true, 472 | "requires": { 473 | "@babel/highlight": "^7.18.6" 474 | } 475 | }, 476 | "@babel/helper-validator-identifier": { 477 | "version": "7.19.1", 478 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", 479 | "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", 480 | "dev": true 481 | }, 482 | "@babel/highlight": { 483 | "version": "7.18.6", 484 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", 485 | "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", 486 | "dev": true, 487 | "requires": { 488 | "@babel/helper-validator-identifier": "^7.18.6", 489 | "chalk": "^2.0.0", 490 | "js-tokens": "^4.0.0" 491 | } 492 | }, 493 | "@types/node": { 494 | "version": "8.10.66", 495 | "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", 496 | "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", 497 | "dev": true 498 | }, 499 | "@types/vscode": { 500 | "version": "1.74.0", 501 | "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.74.0.tgz", 502 | "integrity": "sha512-LyeCIU3jb9d38w0MXFwta9r0Jx23ugujkAxdwLTNCyspdZTKUc43t7ppPbCiPoQ/Ivd/pnDFZrb4hWd45wrsgA==", 503 | "dev": true 504 | }, 505 | "ansi-styles": { 506 | "version": "3.2.1", 507 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 508 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 509 | "dev": true, 510 | "requires": { 511 | "color-convert": "^1.9.0" 512 | } 513 | }, 514 | "argparse": { 515 | "version": "1.0.10", 516 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 517 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 518 | "dev": true, 519 | "requires": { 520 | "sprintf-js": "~1.0.2" 521 | } 522 | }, 523 | "balanced-match": { 524 | "version": "1.0.2", 525 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 526 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 527 | "dev": true 528 | }, 529 | "brace-expansion": { 530 | "version": "1.1.11", 531 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 532 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 533 | "dev": true, 534 | "requires": { 535 | "balanced-match": "^1.0.0", 536 | "concat-map": "0.0.1" 537 | } 538 | }, 539 | "builtin-modules": { 540 | "version": "1.1.1", 541 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 542 | "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", 543 | "dev": true 544 | }, 545 | "chalk": { 546 | "version": "2.4.2", 547 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 548 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 549 | "dev": true, 550 | "requires": { 551 | "ansi-styles": "^3.2.1", 552 | "escape-string-regexp": "^1.0.5", 553 | "supports-color": "^5.3.0" 554 | } 555 | }, 556 | "color-convert": { 557 | "version": "1.9.3", 558 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 559 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 560 | "dev": true, 561 | "requires": { 562 | "color-name": "1.1.3" 563 | } 564 | }, 565 | "color-name": { 566 | "version": "1.1.3", 567 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 568 | "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", 569 | "dev": true 570 | }, 571 | "commander": { 572 | "version": "2.20.3", 573 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 574 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 575 | "dev": true 576 | }, 577 | "concat-map": { 578 | "version": "0.0.1", 579 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 580 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 581 | "dev": true 582 | }, 583 | "diff": { 584 | "version": "4.0.2", 585 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 586 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 587 | "dev": true 588 | }, 589 | "escape-string-regexp": { 590 | "version": "1.0.5", 591 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 592 | "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", 593 | "dev": true 594 | }, 595 | "esprima": { 596 | "version": "4.0.1", 597 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 598 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 599 | "dev": true 600 | }, 601 | "fs.realpath": { 602 | "version": "1.0.0", 603 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 604 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 605 | "dev": true 606 | }, 607 | "function-bind": { 608 | "version": "1.1.1", 609 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 610 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 611 | "dev": true 612 | }, 613 | "glob": { 614 | "version": "7.2.3", 615 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 616 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 617 | "dev": true, 618 | "requires": { 619 | "fs.realpath": "^1.0.0", 620 | "inflight": "^1.0.4", 621 | "inherits": "2", 622 | "minimatch": "^3.1.1", 623 | "once": "^1.3.0", 624 | "path-is-absolute": "^1.0.0" 625 | } 626 | }, 627 | "has": { 628 | "version": "1.0.3", 629 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 630 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 631 | "dev": true, 632 | "requires": { 633 | "function-bind": "^1.1.1" 634 | } 635 | }, 636 | "has-flag": { 637 | "version": "3.0.0", 638 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 639 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 640 | "dev": true 641 | }, 642 | "inflight": { 643 | "version": "1.0.6", 644 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 645 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 646 | "dev": true, 647 | "requires": { 648 | "once": "^1.3.0", 649 | "wrappy": "1" 650 | } 651 | }, 652 | "inherits": { 653 | "version": "2.0.4", 654 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 655 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 656 | "dev": true 657 | }, 658 | "is-core-module": { 659 | "version": "2.11.0", 660 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", 661 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", 662 | "dev": true, 663 | "requires": { 664 | "has": "^1.0.3" 665 | } 666 | }, 667 | "js-tokens": { 668 | "version": "4.0.0", 669 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 670 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 671 | "dev": true 672 | }, 673 | "js-yaml": { 674 | "version": "3.14.1", 675 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 676 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 677 | "dev": true, 678 | "requires": { 679 | "argparse": "^1.0.7", 680 | "esprima": "^4.0.0" 681 | } 682 | }, 683 | "minimatch": { 684 | "version": "3.1.2", 685 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 686 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 687 | "dev": true, 688 | "requires": { 689 | "brace-expansion": "^1.1.7" 690 | } 691 | }, 692 | "minimist": { 693 | "version": "1.2.7", 694 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", 695 | "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", 696 | "dev": true 697 | }, 698 | "mkdirp": { 699 | "version": "0.5.6", 700 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 701 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 702 | "dev": true, 703 | "requires": { 704 | "minimist": "^1.2.6" 705 | } 706 | }, 707 | "once": { 708 | "version": "1.4.0", 709 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 710 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 711 | "dev": true, 712 | "requires": { 713 | "wrappy": "1" 714 | } 715 | }, 716 | "path-is-absolute": { 717 | "version": "1.0.1", 718 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 719 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 720 | "dev": true 721 | }, 722 | "path-parse": { 723 | "version": "1.0.7", 724 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 725 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 726 | "dev": true 727 | }, 728 | "resolve": { 729 | "version": "1.22.1", 730 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 731 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 732 | "dev": true, 733 | "requires": { 734 | "is-core-module": "^2.9.0", 735 | "path-parse": "^1.0.7", 736 | "supports-preserve-symlinks-flag": "^1.0.0" 737 | } 738 | }, 739 | "semver": { 740 | "version": "5.7.2", 741 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", 742 | "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", 743 | "dev": true 744 | }, 745 | "sprintf-js": { 746 | "version": "1.0.3", 747 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 748 | "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", 749 | "dev": true 750 | }, 751 | "supports-color": { 752 | "version": "5.5.0", 753 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 754 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 755 | "dev": true, 756 | "requires": { 757 | "has-flag": "^3.0.0" 758 | } 759 | }, 760 | "supports-preserve-symlinks-flag": { 761 | "version": "1.0.0", 762 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 763 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 764 | "dev": true 765 | }, 766 | "tslib": { 767 | "version": "1.14.1", 768 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 769 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 770 | "dev": true 771 | }, 772 | "tslint": { 773 | "version": "5.20.1", 774 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", 775 | "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", 776 | "dev": true, 777 | "requires": { 778 | "@babel/code-frame": "^7.0.0", 779 | "builtin-modules": "^1.1.1", 780 | "chalk": "^2.3.0", 781 | "commander": "^2.12.1", 782 | "diff": "^4.0.1", 783 | "glob": "^7.1.1", 784 | "js-yaml": "^3.13.1", 785 | "minimatch": "^3.0.4", 786 | "mkdirp": "^0.5.1", 787 | "resolve": "^1.3.2", 788 | "semver": "^5.3.0", 789 | "tslib": "^1.8.0", 790 | "tsutils": "^2.29.0" 791 | } 792 | }, 793 | "tsutils": { 794 | "version": "2.29.0", 795 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 796 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", 797 | "dev": true, 798 | "requires": { 799 | "tslib": "^1.8.1" 800 | } 801 | }, 802 | "typescript": { 803 | "version": "4.9.4", 804 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", 805 | "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", 806 | "dev": true 807 | }, 808 | "wrappy": { 809 | "version": "1.0.2", 810 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 811 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 812 | "dev": true 813 | } 814 | } 815 | } 816 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-j", 3 | "displayName": "J", 4 | "description": "J Language Support", 5 | "version": "0.9.6", 6 | "publisher": "tikkanz", 7 | "engines": { 8 | "vscode": "^1.66.0" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/tikkanz/j-vscode/issues" 12 | }, 13 | "homepage": "https://github.com/tikkanz/j-vscode/README.md", 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/tikkanz/j-vscode.git" 17 | }, 18 | "icon": "images/j-logo.png", 19 | "categories": [ 20 | "Programming Languages" 21 | ], 22 | "activationEvents": [ 23 | "onLanguage:j" 24 | ], 25 | "main": "./extension.js", 26 | "contributes": { 27 | "languages": [ 28 | { 29 | "id": "j", 30 | "aliases": [ 31 | "J", 32 | "j" 33 | ], 34 | "extensions": [ 35 | ".ijs" 36 | ], 37 | "configuration": "./language-configuration.json" 38 | } 39 | ], 40 | "grammars": [ 41 | { 42 | "language": "j", 43 | "scopeName": "source.j", 44 | "path": "./syntaxes/j.tmLanguage.json" 45 | } 46 | ], 47 | "configurationDefaults": { 48 | "j.executablePath": "ijconsole", 49 | "terminal.integrated.enablePersistentSessions": false, 50 | "[j]": { 51 | "editor.language.colorizedBracketPairs": [ 52 | ["(", ")"] 53 | ], 54 | "editor.wordSeparators": " ,.:", 55 | "editor.foldingStrategy": "auto", 56 | "editor.tabCompletion": "on", 57 | "editor.semanticHighlighting.enabled": false 58 | } 59 | }, 60 | "commands": [ 61 | { 62 | "command": "language-j.loadScript", 63 | "title": "J: Load Script" 64 | }, 65 | { 66 | "command": "language-j.loadDisplayScript", 67 | "title": "J: Load and Display Script" 68 | }, 69 | { 70 | "command": "language-j.execute", 71 | "title": "J: Execute Line/Selection" 72 | }, 73 | { 74 | "command": "language-j.executeAdvance", 75 | "title": "J: Execute Line/Selection and Advance" 76 | }, 77 | { 78 | "command": "language-j.startTerminal", 79 | "title": "J: Start new JConsole Terminal" 80 | }, 81 | { 82 | "command": "language-j.openNuVoc", 83 | "title": "J: Open NuVoc Help in Browser" 84 | } 85 | ], 86 | "keybindings": [ 87 | { 88 | "command": "language-j.loadScript", 89 | "key": "ctrl+L", 90 | "mac": "cmd+L", 91 | "when": "editorTextFocus && editorLangId == 'j'" 92 | }, 93 | { 94 | "command": "language-j.loadDisplayScript", 95 | "key": "ctrl+shift+L", 96 | "mac": "cmd+shift+L", 97 | "when": "editorTextFocus && editorLangId == 'j'" 98 | }, 99 | { 100 | "command": "language-j.execute", 101 | "key": "ctrl+R", 102 | "mac": "cmd+R", 103 | "when": "editorTextFocus && editorLangId == 'j'" 104 | }, 105 | { 106 | "command": "language-j.executeAdvance", 107 | "key": "ctrl+enter", 108 | "mac": "cmd+enter", 109 | "when": "editorTextFocus && editorLangId == 'j'" 110 | }, 111 | { 112 | "command": "language-j.startTerminal", 113 | "key": "ctrl+shift+J", 114 | "mac": "cmd+shift+J", 115 | "when": "editorTextFocus && editorLangId == 'j'" 116 | } 117 | ], 118 | "configuration": { 119 | "type": "object", 120 | "title": "J", 121 | "properties": { 122 | "j.executablePath": { 123 | "type": [ 124 | "string", 125 | "null" 126 | ], 127 | "default": "jconsole", 128 | "description": "Points to the jconsole executable.", 129 | "scope": "window" 130 | } 131 | } 132 | } 133 | }, 134 | "scripts": { 135 | "vscode:prepublish": "npm run compile", 136 | "compile": "tsc -p ./", 137 | "watch": "tsc -watch -p ./" 138 | }, 139 | "devDependencies": { 140 | "@types/node": "^8.10.66", 141 | "@types/vscode": "^1.66.0", 142 | "tslint": "^5.16.0", 143 | "typescript": "^4.9.4" 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Terminal, 3 | TextEditor, 4 | ExtensionContext, 5 | env, 6 | Uri, 7 | TextEditorEdit, 8 | commands, 9 | workspace, 10 | window, 11 | Position, 12 | } from 'vscode' 13 | 14 | type Cmd = (editor: TextEditor) => void 15 | 16 | export function activate(context: ExtensionContext) { 17 | const cmds: [string, Cmd][] = [ 18 | ['language-j.startTerminal', startTerminal], 19 | ['language-j.loadScript', loadScript], 20 | ['language-j.loadDisplayScript', loadDisplayScript], 21 | ['language-j.execute', execute], 22 | ['language-j.executeAdvance', executeAdvance], 23 | ['language-j.openNuVoc', openNuVoc] 24 | ] 25 | 26 | for (const [n, f] of cmds) { commands.registerTextEditorCommand(n, f) } 27 | 28 | } 29 | 30 | let terminal: Terminal = null 31 | let isWinExe: boolean 32 | 33 | export function deactivate(context: ExtensionContext) { 34 | if (terminal != null) { terminal.dispose() } 35 | } 36 | 37 | function createTerminal(): Terminal { 38 | const config = workspace.getConfiguration('j') 39 | 40 | isWinExe = config.executablePath.endsWith('.exe') 41 | return window.createTerminal({ 42 | name: "Jconsole", shellPath: config.executablePath 43 | }) 44 | } 45 | 46 | window.onDidChangeActiveTerminal(nextTerminal => { 47 | if (nextTerminal === undefined) { return } 48 | if (nextTerminal.name == "Jconsole") { 49 | terminal = nextTerminal 50 | } else { 51 | const jTerminals = window.terminals.filter(t => t.name == "Jconsole") 52 | terminal = jTerminals.length > 0 ? jTerminals[0] : null 53 | } 54 | }) 55 | 56 | function getTerminal() { 57 | if (terminal === null || terminal.exitStatus != undefined) { 58 | terminal = createTerminal() 59 | } 60 | terminal.show(true) 61 | } 62 | 63 | function startTerminal() { 64 | terminal = createTerminal() 65 | terminal.show(false) 66 | } 67 | 68 | function loadScript(editor: TextEditor) { 69 | editor.document.save() 70 | sendTerminalText(`load '${editor.document.fileName}'`) 71 | } 72 | 73 | function loadDisplayScript(editor: TextEditor) { 74 | editor.document.save() 75 | sendTerminalText(`loadd '${editor.document.fileName}'`) 76 | } 77 | 78 | function execute(editor: TextEditor) { 79 | _execute(editor) 80 | } 81 | 82 | function executeAdvance(editor: TextEditor) { 83 | let endPosition = _execute(editor) 84 | let offset = getNextNonBlankLineOffset(editor, endPosition) 85 | commands.executeCommand('cursorMove', { 86 | to: "down", 87 | by: "wrappedLine", 88 | value: offset 89 | }) 90 | commands.executeCommand("cursorMove", { 91 | to: "wrappedLineEnd" 92 | }) 93 | } 94 | 95 | function _execute(editor: TextEditor): Position { 96 | let [text, endPosition] = getExecutionText(editor) 97 | sendTerminalText(text) 98 | return endPosition 99 | } 100 | 101 | function getExecutionText(editor: TextEditor): [string, Position] { 102 | if (!editor.selection.isEmpty) { 103 | const text = editor.document.getText(editor.selection) 104 | return [text, editor.selection.end] 105 | } else { 106 | let lineIndex = editor.selection.active.line 107 | let text = getLineText(editor, lineIndex) 108 | 109 | if (!isMultilineStart(text)) { 110 | return [text, editor.selection.active] 111 | } 112 | 113 | text = "" 114 | while (lineIndex < editor.document.lineCount) { 115 | let nextLine = getLineText(editor, lineIndex) 116 | text += `\n${nextLine}` 117 | if (isMultilineEnd(nextLine)) { 118 | return [text, new Position(lineIndex, nextLine.length)] 119 | } 120 | lineIndex++ 121 | } 122 | 123 | throw new Error("Incomplete multiline definition!") 124 | } 125 | } 126 | 127 | function isMultilineStart(text: string): boolean { 128 | const regex = /(?\\+\\*\\-%$|,#{}^~\"?]\\.)(?![.:])" 410 | }, 411 | { 412 | "comment": "symbols with : inflection", 413 | "name": "keyword.operator.verb.j", 414 | "match": "([<>\\+\\*\\-%$|,#{};~\"_\\/\\\\\\[]:)(?![.:])" 415 | }, 416 | { 417 | "comment": "symbols with no inflection", 418 | "name": "keyword.operator.verb.j", 419 | "match": "([<>\\+\\*\\-%$|,#{!;^=?\\[\\]])(?![.:])" 420 | }, 421 | { 422 | "comment": "letters with inflection", 423 | "name": "keyword.operator.adverb.j", 424 | "match": "\\b(([bfM]\\.))(?![.:])" 425 | }, 426 | { 427 | "comment": "symbols with and without . inflection", 428 | "name": "keyword.operator.adverb.j", 429 | "match": "(([\\/\\\\]\\.)|(\\/\\.\\.)|([~\\/\\\\}]))(?![.:])" 430 | }, 431 | { 432 | "comment": "letters with inflection", 433 | "name": "keyword.operator.conjunction.j", 434 | "match": "\\b(([Ht]\\.)|([LS]:))(?![.:])" 435 | }, 436 | { 437 | "comment": "symbols with double inflection, . or : inflection or no inflection", 438 | "name": "keyword.operator.conjunction.j", 439 | "match": "((&\\.:)|([&@!;]\\.)|([&@!`^]:)|([&@`\"]))(?![.:])" 440 | }, 441 | { 442 | "comment": ". or : with or without inflection (need leading whitespace)", 443 | "name": "keyword.operator.conjunction.j", 444 | "match": "(?<=\\s)([:][.:]|[.:])(?![.:])" 445 | } 446 | ] 447 | }, 448 | "string": { 449 | "patterns": [ 450 | { 451 | "comment": "single line string", 452 | "name": "string.quoted.single.j", 453 | "match": "(')[^']*(?:''[^']*)*(')", 454 | "captures": { 455 | "1": { 456 | "name": "punctuation.definition.string.begin.j" 457 | }, 458 | "2": { 459 | "name": "punctuation.definition.string.end.j" 460 | } 461 | } 462 | } 463 | ] 464 | } 465 | }, 466 | "firstLineMatch": "^#!.*\\bjconsole\\s*$", 467 | "foldingStartMarker": "^\\s*(?:if|while|for|try)\\.(?![.:])(?!.*\\bend\\b).*$", 468 | "foldingStopMarker": "^\\s*(?:end)\\.(?![.:]).*$" 469 | } -------------------------------------------------------------------------------- /syntaxes/j.tmLanguage.yaml: -------------------------------------------------------------------------------- 1 | # [PackageDev] target_format: plist, ext: tmLanguage 2 | comment: | 3 | Reference to the Oniguruma Regex libraray: 4 | https://github.com/kkos/oniguruma/blob/master/doc/RE 5 | 6 | * The reference version for this TextMate grammar is the YAML version here: 7 | https://github.com/tikkanz/j-vscode/blob/master/syntaxes/j.tmLanguage.yaml 8 | Convert to other formats (JSON, PLIST) using utils (e.g. TextMate Languages extension for VS Code) 9 | * Some in comments throughout the grammar 10 | name: J 11 | scopeName: source.j 12 | fileTypes: [ijs, ijt] 13 | 14 | patterns: 15 | - include: '#direct_noun_defn' 16 | - include: '#direct_defn' 17 | - include: '#explicit_defn' 18 | - include: '#modifier_explicit_defn' 19 | - include: '#explicit_string_defn' 20 | - include: '#noun_defn' 21 | - include: '#bracket' 22 | - include: '#number' 23 | - include: '#operator' 24 | - include: '#copula' 25 | - include: '#string' 26 | - include: '#note' 27 | - include: '#comment' 28 | 29 | repository: 30 | bracket: 31 | patterns: 32 | - name: meta.bracket.j 33 | match: (\(|\)) 34 | 35 | comment: 36 | patterns: 37 | - name: comment.line.j 38 | match: \b(NB\.).*$ 39 | captures: 40 | 1: {name: punctuation.definition.comment.begin.j} 41 | 42 | copula: 43 | patterns: 44 | - comment: assignment operators 45 | name: copula.global.j 46 | match: '=:' 47 | - name: copula.local.j 48 | match: =\. 49 | 50 | direct_defn: 51 | patterns: 52 | - comment: direct definition of verbs/modifiers 53 | name: definition.explicit.block.j 54 | begin: ((\{\{)(\)[mdvac])(.*$)|(\{\{)(?![.:\)])) 55 | beginCaptures: 56 | 0: {name: punctuation.definition.explicit.begin.j} 57 | end: (\}\})(?![.:]) 58 | endCaptures: 59 | 0: {name: punctuation.definition.explicit.end.j} 60 | patterns: 61 | - include: '#direct_noun_defn' 62 | - include: '#direct_defn' 63 | - include: '#explicit_arg' 64 | - include: '#explicit_operand' 65 | - include: '#bracket' 66 | - include: '#number' 67 | - include: '#operator' 68 | - include: '#copula' 69 | - include: '#string' 70 | - include: '#keyword' 71 | - include: '#comment' 72 | 73 | direct_noun_defn: 74 | patterns: 75 | - comment: direct definition of nouns 76 | name: string.noun.j 77 | begin: (\{\{)(\)n) 78 | beginCaptures: 79 | 0: {name: punctuation.definition.string.block.begin.j} 80 | end: (^\}\})(?![.:]) 81 | endCaptures: 82 | 0: {name: punctuation.definition.explicit.end.j} 83 | 84 | explicit_arg: 85 | patterns: 86 | - comment: argument identifiers within explicit definition blocks 87 | name: variable.parameter.j 88 | match: \b[xy](?![\w.:]) 89 | 90 | explicit_defn: 91 | patterns: 92 | - comment: explicit definition of a verb 93 | name: definition.explicit.block.j 94 | begin: \b([34]|13|verb|monad|dyad)\s+(:\s*0|define)\b 95 | beginCaptures: 96 | 0: {name: punctuation.definition.explicit.begin.j} 97 | end: ^\s*\)\s*\n 98 | endCaptures: 99 | 0: {name: punctuation.definition.explicit.end.j} 100 | patterns: 101 | - include: '#direct_noun_defn' 102 | - include: '#direct_defn' 103 | - include: '#explicit_arg' 104 | - include: '#bracket' 105 | - include: '#number' 106 | - include: '#operator' 107 | - include: '#copula' 108 | - include: '#string' 109 | - include: '#keyword' 110 | - include: '#comment' 111 | 112 | explicit_operand: 113 | patterns: 114 | - comment: operand identifiers within modifier explicit definition blocks 115 | name: variable.parameter.j 116 | match: \b[nmuv](?![\w.:]) 117 | 118 | explicit_string_defn: 119 | patterns: 120 | - comment: explicit string definition of verb or modifier 121 | name: definition.explicit.string.j 122 | match: \b(([1-4]|adverb|conjunction|verb|monad|dyad)\s+(:|def))\s*((')[^']*(?:''[^']*)*(')) 123 | captures: 124 | 1: {name: punctuation.definition.explicit.begin.j} 125 | 4: {name: string.quoted.single.j} 126 | 127 | keyword: 128 | patterns: 129 | - name: keyword.control.j 130 | match: \b(if|do|else|elseif|for|select|case|fcase)\.(?![.:]) 131 | - name: keyword.control.j 132 | match: \b(assert|break|continue|return|while|whilst)\.(?![.:]) 133 | - name: keyword.control.j 134 | match: \b(throw|try|catch|catchd|catcht)\.(?![.:]) 135 | - name: keyword.control.j 136 | match: \b(for_[A-Za-z][A-Za-z_0-9]*|goto_[A-Za-z][A-Za-z_0-9]*|label_[A-Za-z][A-Za-z_0-9]*)\.(?![.:]) 137 | - name: keyword.control.end.j 138 | match: \bend\.(?![.:]) 139 | 140 | modifier_explicit_defn: 141 | patterns: 142 | - comment: explicit definition of a modifier (adverb/conjunction) 143 | name: definition.explicit.block.j 144 | begin: \b([12]|adverb|conjunction)\s+(:\s*0|define)\b 145 | beginCaptures: 146 | 0: {name: punctuation.definition.explicit.begin.j} 147 | end: ^\s*\)\s*\n 148 | endCaptures: 149 | 0: {name: punctuation.definition.explicit.end.j} 150 | patterns: 151 | - include: '#direct_noun_defn' 152 | - include: '#direct_defn' 153 | - include: '#explicit_arg' 154 | - include: '#explicit_operand' 155 | - include: '#bracket' 156 | - include: '#number' 157 | - include: '#operator' 158 | - include: '#copula' 159 | - include: '#string' 160 | - include: '#keyword' 161 | - include: '#comment' 162 | 163 | note: 164 | patterns: 165 | - comment: multi-line Note 166 | name: comment.block.note.j 167 | begin: ^\s*\bNote\b 168 | beginCaptures: 169 | 0: {name: punctuation.definition.comment.begin.j} 170 | end: ^\s*\)\s*\n 171 | endCaptures: 172 | 0: {name: punctuation.definition.comment.end.j} 173 | - comment: single-line Note 174 | name: comment.line.note.j 175 | match: \bNote\b(?!\s*\=[:.])\s*[\'\d].*$ 176 | 177 | noun_defn: 178 | patterns: 179 | - comment: multi-line noun definition 180 | name: string.noun.j 181 | begin: \b(0|noun)\s+(:\s*0|define)\b 182 | beginCaptures: 183 | 0: {name: punctuation.definition.string.block.begin.j} 184 | end: ^\s*\)\s*\n 185 | endCaptures: 186 | 0: {name: punctuation.definition.explicit.end.j} 187 | 188 | number: 189 | patterns: 190 | - comment: classic numbers 191 | name: constant.numeric.j 192 | match: \b(?\+\*\-%$|,#{}^~"?]\.)(?![.:]) 213 | - comment: 'symbols with : inflection' 214 | name: keyword.operator.verb.j 215 | match: ([<>\+\*\-%$|,#{};~"_\/\\\[]:)(?![.:]) 216 | - comment: symbols with no inflection 217 | name: keyword.operator.verb.j 218 | match: ([<>\+\*\-%$|,#{!;^=?\[\]])(?![.:]) 219 | - comment: letters with inflection 220 | name: keyword.operator.adverb.j 221 | match: \b(([bfM]\.))(?![.:]) 222 | - comment: symbols with and without . inflection 223 | name: keyword.operator.adverb.j 224 | match: (([\/\\]\.)|(\/\.\.)|([~\/\\}]))(?![.:]) 225 | - comment: letters with inflection 226 | name: keyword.operator.conjunction.j 227 | match: \b(([Ht]\.)|([LS]:))(?![.:]) 228 | - comment: 'symbols with double inflection, . or : inflection or no inflection' 229 | name: keyword.operator.conjunction.j 230 | match: ((&\.:)|([&@!;]\.)|([&@!`^]:)|([&@`"]))(?![.:]) 231 | - comment: '. or : with or without inflection (need leading whitespace)' 232 | name: keyword.operator.conjunction.j 233 | match: (?<=\s)([:][.:]|[.:])(?![.:]) 234 | 235 | string: 236 | patterns: 237 | - comment: single line string 238 | # handles escaped quotes & restricts scope to current line 239 | name: string.quoted.single.j 240 | match: (')[^']*(?:''[^']*)*(') 241 | captures: 242 | 1: {name: punctuation.definition.string.begin.j} 243 | 2: {name: punctuation.definition.string.end.j} 244 | 245 | firstLineMatch: ^#!.*\bjconsole\s*$ 246 | foldingStartMarker: ^\s*(?:if|while|for|try)\.(?![.:])(?!.*\bend\b).*$ 247 | foldingStopMarker: ^\s*(?:end)\.(?![.:]).*$ 248 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */ 4 | 5 | /* Basic Options */ 6 | // "incremental": true, /* Enable incremental compilation */ 7 | "target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ 8 | "module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ 9 | // "lib": [], /* Specify library files to be included in the compilation. */ 10 | // "allowJs": true, /* Allow javascript files to be compiled. */ 11 | // "checkJs": true, /* Report errors in .js files. */ 12 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ 13 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 14 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 15 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 16 | // "outFile": "./extension.js", /* Concatenate and emit output to single file. */ 17 | "outDir": "./", /* Redirect output structure to the directory. */ 18 | "rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 19 | // "composite": true, /* Enable project compilation */ 20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 21 | // "removeComments": true, /* Do not emit comments to output. */ 22 | // "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true, /* Enable all strict type-checking options. */ 29 | "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | "strictNullChecks": false, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 39 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 40 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 41 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 42 | // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ 43 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */ 44 | // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ 45 | 46 | /* Module Resolution Options */ 47 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 48 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 49 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 50 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 51 | // "typeRoots": [], /* List of folders to include type definitions from. */ 52 | // "types": [], /* Type declaration files to be included in compilation. */ 53 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 54 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 55 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 56 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 57 | 58 | /* Source Map Options */ 59 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 60 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 61 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 62 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 63 | 64 | /* Experimental Options */ 65 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 66 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 67 | 68 | /* Advanced Options */ 69 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 70 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 71 | }, 72 | "include": ["/**/*"], 73 | "exclude": ["node_modules"], 74 | } 75 | -------------------------------------------------------------------------------- /user_settings_j.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tokenColorCustomizations":{ 3 | "textMateRules": [ 4 | { 5 | "scope": "comment", 6 | "settings": { 7 | "foreground": "#75715E", 8 | "fontStyle": "italic" 9 | } 10 | }, 11 | { 12 | "scope": ["punctuation.definition.comment.begin.j", 13 | "punctuation.definition.comment.end.j" 14 | ], 15 | "settings": { 16 | "foreground": "#a5a38f", 17 | "fontStyle": "italic bold" 18 | } 19 | }, 20 | { 21 | "scope": ["punctuation.definition.explicit.begin.j", 22 | "punctuation.definition.explicit.end.j", 23 | "punctuation.definition.string.block.begin.j", 24 | "punctuation.definition.string.block.end.j" 25 | ], 26 | "settings": { 27 | "foreground": "#ae81ff", 28 | "fontStyle": "italic bold" 29 | } 30 | }, 31 | { 32 | "scope": "keyword.operator.verb.j", 33 | "settings": { 34 | "foreground": "#49F672" 35 | } 36 | }, 37 | { 38 | "scope": "keyword.operator.adverb.j", 39 | "settings": { 40 | "foreground": "#AAEEAA" 41 | } 42 | }, 43 | { 44 | "scope": "keyword.operator.conjunction.j", 45 | "settings": { 46 | "foreground": "#228822" 47 | } 48 | 49 | } 50 | ] 51 | } 52 | } -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension. 6 | * `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. 7 | * `syntaxes/j.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. 8 | * `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. 9 | 10 | ## Get up and running straight away 11 | 12 | * Make sure the language configuration settings in `language-configuration.json` are accurate. 13 | * Press `F5` to open a new window with your extension loaded. 14 | * Create a new file with a file name suffix matching your language. 15 | * Verify that syntax highlighting works and that the language configuration settings are working. 16 | 17 | ## Make changes 18 | 19 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 20 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 21 | 22 | ## Add more language features 23 | 24 | * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs 25 | 26 | ## Install your extension 27 | 28 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 29 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 30 | --------------------------------------------------------------------------------