├── .github └── workflows │ ├── codeql-analysis.yml │ ├── deploy.yml │ ├── node.js.yml │ └── preview.yml ├── .gitignore ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── SECURITY.md ├── build.mjs ├── extension.js ├── icon.png ├── language-configuration.json ├── original-grammar ├── ArgData.json ├── CompletionData.json ├── CompletionTypes.json ├── Encryption.json ├── Examples.json ├── HoverData.json ├── Nightly.json ├── ReturnData.json └── TypeData.json ├── package-lock.json ├── package.json ├── snippets └── main.json ├── syntaxes ├── greyscript.tmLanguage.json.old ├── greyscript.tmLanguage.json.oldest └── greyscript.tmLanguage.json.template └── webpack.config.js /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ main, experimental ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ main, experimental ] 20 | 21 | jobs: 22 | analyze: 23 | name: Analyze 24 | runs-on: ubuntu-latest 25 | permissions: 26 | actions: read 27 | contents: read 28 | security-events: write 29 | 30 | strategy: 31 | fail-fast: false 32 | matrix: 33 | language: [ 'javascript' ] 34 | 35 | steps: 36 | - name: Checkout repository 37 | uses: actions/checkout@v2 38 | 39 | # Initializes the CodeQL tools for scanning. 40 | - name: Initialize CodeQL 41 | uses: github/codeql-action/init@v1 42 | with: 43 | languages: ${{ matrix.language }} 44 | # If you wish to specify custom queries, you can do so here or in a config file. 45 | # By default, queries listed here will override any specified in a config file. 46 | # Prefix the list here with "+" to use these queries and those in the config file. 47 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 48 | 49 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 50 | # If this step fails, then you should remove it and run the build manually (see below) 51 | - name: Autobuild 52 | uses: github/codeql-action/autobuild@v1 53 | 54 | # ℹ️ Command-line programs to run using the OS shell. 55 | # 📚 https://git.io/JvXDl 56 | 57 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 58 | # and modify them (or add more) to build your code if your project 59 | # uses a compiled language 60 | 61 | #- run: | 62 | # make bootstrap 63 | # make release 64 | 65 | - name: Perform CodeQL Analysis 66 | uses: github/codeql-action/analyze@v1 67 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Deploy 4 | 5 | # Controls when the workflow will run 6 | on: 7 | workflow_dispatch: 8 | 9 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 10 | jobs: 11 | # This workflow contains a single job called "build" 12 | Deploy: 13 | environment: primary 14 | # The type of runner that the job will run on 15 | runs-on: ubuntu-latest 16 | permissions: 17 | contents: write 18 | 19 | # Steps represent a sequence of tasks that will be executed as part of the job 20 | steps: 21 | # Install NodeJS 22 | - name: Install NodeJS 23 | uses: actions/setup-node@v2.4.1 24 | with: 25 | node-version: '16' 26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 27 | - uses: actions/checkout@v2 28 | 29 | - name: Install VSCE + OVSX 30 | run: npm install -g vsce ovsx 31 | 32 | - name: Install Webpack Dependencies 33 | run: npm install -g esbuild webpack webpack-cli 34 | 35 | - name: Install Dependencies 36 | run: npm install --include=dev 37 | 38 | - name: Package Extension 39 | run: vsce package -o extension.vsix 40 | 41 | - name: Publish to DevOps 42 | run: vsce publish 43 | env: 44 | VSCE_PAT: ${{ SECRETS.DEPLOYTOKEN }} 45 | 46 | # - name: Publish to OSVX 47 | # run: npx publish extension.vsix -p ${{ SECRETS.OSVXTOKEN }} 48 | 49 | - name: Publish GitHub Release 50 | run: | 51 | ver=$(npm pkg get version) 52 | ver=${ver//\"/} 53 | reg="^(#{1,2}\s$ver(?:\n.+)+)" 54 | grep -zoP $reg CHANGELOG.md > notes.md 55 | tr < notes.md -d '\000' > release-notes.md 56 | echo ${{ github.token }} | gh auth login --with-token 57 | echo gh release create $ver extension.vsix -F release-notes.md -d 58 | gh release create $ver extension.vsix -F release-notes.md 59 | Preview: 60 | environment: preview 61 | runs-on: ubuntu-latest 62 | permissions: 63 | contents: write 64 | steps: 65 | # Install NodeJS 66 | - name: Install NodeJS 67 | uses: actions/setup-node@v2.4.1 68 | with: 69 | node-version: '16' 70 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 71 | - uses: actions/checkout@v2 72 | 73 | - name: Install VSCE 74 | run: npm install -g vsce 75 | 76 | - name: Install Webpack Dependencies 77 | run: npm install -g esbuild webpack webpack-cli 78 | 79 | - name: Package Extension 80 | run: vsce package -o extension.vsix 81 | 82 | - name: Publish to DevOps 83 | run: vsce publish --pre-release 84 | env: 85 | VSCE_PAT: ${{ SECRETS.DEPLOYTOKEN }} 86 | 87 | - name: Publish GitHub Release 88 | run: | 89 | ver=$(npm pkg get version) 90 | ver=${ver//\"/} 91 | reg="^(#{1,2}\s$ver(?:\n.+)+)" 92 | grep -zoP $reg CHANGELOG.md > notes.md 93 | tr < notes.md -d '\000' > release-notes.md 94 | echo ${{ github.token }} | gh auth login --with-token 95 | echo gh release create $ver extension.vsix -F release-notes.md -d 96 | gh release create $ver extension.vsix -F release-notes.md -p 97 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Primary 5 | 6 | on: 7 | push: 8 | branches: [ main, experimental ] 9 | pull_request: 10 | branches: [ main, experimental ] 11 | 12 | jobs: 13 | build: 14 | name: Build 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v2 19 | - name: Setup Node.JS 20 | uses: actions/setup-node@v1 21 | with: 22 | node-version: 14 23 | - name: Install dependencies 24 | run: | 25 | npm install 26 | npm install -g vsce 27 | - name: Package Extension 28 | run: vsce package -o extension.vsix 29 | - name: Upload 30 | uses: actions/upload-artifact@v2 31 | with: 32 | name: Extension 33 | path: extension.vsix 34 | test: 35 | name: Test 36 | strategy: 37 | matrix: 38 | os: [macos-latest, ubuntu-latest, windows-latest] 39 | runs-on: ${{ matrix.os }} 40 | steps: 41 | - name: Checkout 42 | uses: actions/checkout@v2 43 | - name: Setup Node.js 44 | uses: actions/setup-node@v1 45 | with: 46 | node-version: 14 47 | - name: Install dependencies 48 | run: npm install 49 | - name: Run headless test 50 | uses: GabrielBB/xvfb-action@v1.0 51 | with: 52 | run: npm test 53 | -------------------------------------------------------------------------------- /.github/workflows/preview.yml: -------------------------------------------------------------------------------- 1 | name: Preview 2 | on: 3 | workflow_dispatch: 4 | jobs: 5 | Preview: 6 | environment: preview 7 | runs-on: ubuntu-latest 8 | permissions: 9 | contents: write 10 | steps: 11 | # Install NodeJS 12 | - name: Install NodeJS 13 | uses: actions/setup-node@v2.4.1 14 | with: 15 | node-version: '16' 16 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 17 | - uses: actions/checkout@v2 18 | 19 | - name: Install VSCE 20 | run: npm install -g vsce 21 | 22 | - name: Install Webpack Dependencies 23 | run: npm install -g esbuild webpack webpack-cli 24 | 25 | - name: Install Dependencies 26 | run: npm install --dev 27 | 28 | - name: Package Extension 29 | run: vsce package -o extension.vsix 30 | 31 | - name: Publish to DevOps 32 | run: vsce publish --pre-release 33 | env: 34 | VSCE_PAT: ${{ SECRETS.DEPLOYTOKEN }} 35 | 36 | - name: Publish GitHub Release 37 | run: | 38 | ver=$(npm pkg get version) 39 | ver=${ver//\"/} 40 | reg="^(#{1,2}\s$ver(?:\n.+)+)" 41 | grep -zoP $reg CHANGELOG.md > notes.md 42 | tr < notes.md -d '\000' > release-notes.md 43 | echo ${{ github.token }} | gh auth login --with-token 44 | echo gh release create $ver extension.vsix -F release-notes.md -d 45 | gh release create $ver extension.vsix -F release-notes.md -p 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* 2 | *.vsix 3 | npm-debug.log 4 | out/* 5 | node_modules/* 6 | tests/* 7 | computedgrammar/* 8 | syntaxes/greyscript.tmLanguage.json -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | node_modules 3 | extension.js 4 | webpack.config.js 5 | .gitignore 6 | .git/ 7 | .github/ 8 | ecomp.js 9 | expcompile.js 10 | expver.js 11 | grammar/ 12 | SECURITY.md 13 | tests/ 14 | miniscript/ 15 | original-grammar/ 16 | build.mjs 17 | syntaxes/greyscript.tmLanguage.json.oldest 18 | syntaxes/greyscript.tmLanguage.json.template 19 | syntaxes/greyscript.tmLanguage.json.old 20 | *.vsix 21 | computedgrammar/ -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 3.0.8 2 | - If JSDoc parsing fails, append to the description instead of crashing. 3 | - Fix `local` being highlighted instead of `locals`. 4 | - The new methods (`get_ctf`, `CTFEvent`, etc.) have been shipped for offline use with this version. (While online, the extension will pull from [Greydocs](https://wyattsl.github.io/greydocs) to provide semantics) 5 | 6 | # 3.0.7 7 | - Fix some syntax 8 | 9 | # 3.0.6 10 | **This update is for 3.0.1 - 3.0.6 merging from preview into stable.** 11 | - (3.0.1) Documentation is now automatically pulled from [Greydocs](https://wyattsl.github.io/greydocs) 12 | - (3.0.1) User-defined variables & functions are now highlighted. 13 | - (3.0.3) Added some snippets for basic flow control. 14 | - (3.0.6) Improved the performance of the new semantics provider. 15 | - (3.0.6) Variables now support comments, and variables assigned to methods will show the return type of that method. 16 | - (3.0.6) Added JsDoc support! Only `@description`, `@param`, `@returns`, `@example`, `@author`, `@deprecated`, & `@readonly` are supported at this time. Example: 17 | ```js 18 | // Concatinate or add three strings or numbers. 19 | // @description (Why is this a function again?) 20 | // @param a {String|Number} String or number 1 21 | // @param b {String|Number} String or number 2 22 | // @param c {String|Number} String or number 3 23 | // @return {String|Number} The concatination of a, b, and c 24 | // @author WyattL 25 | // @example foo("Hello", " ", "There!") // Hello There! 26 | // @example foo(1,2,5) 27 | foo = function(a,b,c) 28 | return a+b+c 29 | end function 30 | ``` 31 | 32 | # 3.0.5 33 | - Fixed a bug in the semantics provider which would crash highlighting if a function contained a 'type'. 34 | 35 | # 3.0.3 36 | - Added some snippets for basic keywords, courtesy of @Crater44 37 | 38 | # 3.0.2 39 | - Semantics improved, now colors when variables and functions are used. (Thanks tux for testing) 40 | 41 | # 3.0.1 42 | - Instead of having two separate documentations (extension docs, and greydocs website) the extension will now attempt to pull documentation data from Greydocs on startup. This can be disabled in settings if your paranoid. When the extension is updated, the current Greydocs data will also be bundled with the extension, to permit offline use. (If you disable this in settings, it will always use bundled.) 43 | - Added semantics! This is the feature that allows highlighting of specific keywords, like variables. The following things are currently classified: classes (Shell, Computer, etc); functions, parameters, variables, methods, strings, keywords, comments, & numbers. Please note I do not handle the colors assigned: those are dependent on your theme. (Thanks Volk & AweTux for the testing) 44 | - *if your wondering why this is 3.x.x now, it because of how the Visual Studio marketplace works. These changes do* ***not*** *merit a major bump, but after removing the old preview branch that used 2.x.x, new updates have to be 3.x.x* 45 | 46 | # 1.9.3 47 | - Updated function hints, comments may now be placed one line above, on the same line, or a line below the function definition. 48 | 49 | # 1.9.2 50 | - Updated grammar to latest version of the game. 51 | - Fix "Go to Declaration" ([#25](https://github.com/WyattSL/greyscript/issues/25)) 52 | - Added a setting for showing symbols in imported files. 53 | - Fixed hoverdocs not showing under specific circumstances. 54 | 55 | # 1.9.1 56 | - Added symbols support. 57 | - Added autocomplete support for import_code 58 | 59 | # 1.9.0 60 | - Add cross file declarations and multiple declarations per file. Thanks, [@SlaskoCZ](https://github.com/SlaskoCZ)! 61 | 62 | # 1.8.1 63 | - Fix matching patterns for keywords. 64 | - Add support for `File.allow_import` 65 | - Fix description of `List.pop` 66 | - Add descriptions for `Shell.masterkey()`, `Shell.masterkey_direct()`, `Shell.restore_network()`, and `File.meta_info()`. 67 | 68 | ## 1.7.12 69 | - Hotfix mark `null` constant. 70 | - Hotfix mark `not` constant. 71 | 72 | ## 1.7.11 73 | - Fix highlighting color always showing support color. 74 | - Add `null` to autocomplete. 75 | - Add `not` to autocomplete. 76 | 77 | ## 1.7.10 78 | - Fix when closing a `)` it didn't stop showing the parameters. 79 | - Fix autocomplete not always showing all the variable options available. 80 | - Add support for describing user defined functions by adding a comment above the defining line. Example below. 81 | ``` 82 | // Description of function 83 | random = function() 84 | ... 85 | ``` 86 | 87 | ## 1.7.9 88 | - Hotfix if hovered over function and prior variable is inside map. 89 | 90 | ## 1.7.8 91 | - Hotfix certain data being undefined in hover text get function. 92 | 93 | ## 1.7.7 94 | - Hotfix color picker not resetting startPos. 95 | 96 | ## 1.7.6 97 | - Fix color picker when same tags occur twice. 98 | - Add parameter autocomplete and hover text. 99 | 100 | ## 1.7.5 101 | - Add variables in completion items. 102 | - Add function parameter signatures. 103 | - Add grammar changes for \[Nightly\] Update v0.7.4063a 104 | 105 | ## 1.7.4 106 | - Fix color picking not working. 107 | - Add hover text for variables and own defined functions. 108 | - The constants 'end', 'then' and 'function' are now included in predictions. 109 | - Fix 'else' description being the same as the 'if' description. 110 | - *maybe* Webpack support. 111 | 112 | ## 1.7.3 113 | - Fix minifier adding unnecessary semi-colons. 114 | 115 | ## 1.7.2 116 | - Minifier is now included, to access use CTRL+SHIFT+P to bring up the console, and use the command "Greyscript: Minify". 117 | 118 | ## 1.7.1 119 | - Webpack support 120 | - Better autocomplete/prediction. 121 | 122 | ## 1.6.4 123 | - Patch minor coloring issues. 124 | 125 | ## 1.6.3 126 | - Hotfix for potential bug in encryption detection. 127 | 128 | ## 1.6.2 129 | - Hotfix for HoverDocs 130 | 131 | ## 1.6.1 132 | - Support for the new nightly functions. 133 | 134 | ## 1.6.0 135 | - Introduced support for error checking, will currently check for disallowed functions inside encryption/decryption. Will be expanded in future releases. 136 | 137 | ## 1.4.2 138 | - Visual Studio Code will now auto-indent as you type. 139 | 140 | ## 1.4.1 141 | - You may now use Go To Declaration to find the declaration of a variable or function. Rightclick on some text and press ``Go To Declaration`` to try it out. 142 | 143 | ## 1.4.0 144 | - ``Computer.create_folder`` is now highlighted. 145 | - ``Router.firewall_rules`` is now highlighted. 146 | - Properties should no longer be half-highlighted (e.g. ``val``ue) 147 | - Support functions should now have hover-data associated with them. 148 | - ``hash``, ``wait``, ``yield``, and ``launch_path`` are now properly highlighted and documented. 149 | - ``Goto Error`` should now be **far** more accurate. You should be placed either on the line, or within 1-3 lines in either direction. 150 | 151 | ## 1.3.5 152 | - ``self`` is now highlighted. 153 | - Fixed some highlighting issues between class definitions. 154 | 155 | ## 1.3.4 156 | - Highlighting fixes. (again...) 157 | 158 | ## 1.3.3 159 | - Highlighting fixes. 160 | 161 | ## 1.3.2 162 | - You can now disable autocomplete or hover-documentation in the GreyScript Configuration. Use CTRL+, to access the VSCode Configuration. 163 | 164 | ## 1.3.1 165 | - Properly documented ``File.is_folder`` 166 | - Added documentation for control characters. 167 | 168 | 169 | ## 1.3.0 170 | - You can now find the accurate line of a error (within like, two or so lines in both directions), this however requires the inaccurate line given by the compiler. You can access this command with CTRL+SHIFT+P, then type in ``Goto Error``. Press enter, then type in the inaccurate line. 171 | 172 | ## 1.2.3 173 | - scan_address (*should*) be correctly highlighted. 174 | 175 | 176 | ## 1.2.2 177 | - Fixed duplicates in auto-completion lists. 178 | - Shows all documentation data, instead of just data for strings. (lists/maps) 179 | 180 | 181 | ## 1.2.1 182 | - True/False now receive highlighting. 183 | - The params constant now receives highlighting. 184 | 185 | 186 | ## 1.2.0 187 | - All String, Number, List, and Map functions now receive highlighting, and autocompletion. 188 | 189 | 190 | ## 1.1.1 191 | - All classes now receive highlighting. 192 | - Null now receives highlighting. 193 | 194 | 195 | ## 1.1.0 196 | - Shell.launch is now highlighted. 197 | - Shell.connect_service is now highlighted. 198 | - File.set_owner is properly documented. 199 | 200 | 201 | ## 1.0.1 202 | - Introduction of autocompletion. 203 | - Minor bug fixes. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2021 Wyatt Lipscomb 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | GreyScript formatting, highlighting, and other cool features for [Grey Hack](https://greyhackgame.com).
2 | Report bugs [here](https://github.com/WyattSL/greyscript/issues). 3 | 4 | ## Usage 5 | Greyscript's syntax highlighting (*should*) automatically activate if you edit a `.gs` or `.src` file, but to enable it manually, use CTRL+K, CTRL+M and select `Greyscript`. 6 | 7 | 8 | To use commands, press CTRL+SHIFT+P to view the command bar, and enter `Greyscript:`. 9 | 10 | Greyscript has a `Goto Error` command, which *should* be able to take the error line given from a program, and translate it to the actual line. Grey Hack has (*or had?*) a known bug where the line given would sometimes be off by an amount, due to certain circumstances. 11 | 12 | Greyscript also has a `Minify` command, which *should* able to minify the current file. 13 | 14 | ## Settings 15 | If you decide that you do not like some of the awesome features provided by the extension, you may disable certain aspects in the [settings menu](https://code.visualstudio.com/docs/getstarted/settings) of Visual Studio Code. 16 | 17 | ## JsDoc 18 | Greyscript supports *some* of the JsDoc documentation features! The following attributes are supported: `@description`, `@param`, `@return`, `@author`, `@example`, `@deprecated`, `@readonly`, with more planned. You may use them like the following: 19 | ```js 20 | // Concatinate or add three strings or numbers. 21 | // @description (Why is this a function again?) 22 | // @param a {String|Number} String or number 1 23 | // @param b {String|Number} String or number 2 24 | // @param c {String|Number} String or number 3 25 | // @return {String|Number} The concatination of a, b, and c 26 | // @author WyattL 27 | // @example foo("Hello", " ", "There!") // Hello There! 28 | // @example foo(1,2,5) 29 | foo = function(a,b,c) 30 | return a+b+c 31 | end function 32 | ``` -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Due to the nature of the extension, security vulnerabilities should be *very* rare, however just in case: 4 | 5 | ## Supported Versions 6 | 7 | The latest version of the extension is the only supported version. 8 | 9 | ## Reporting a Vulnerability 10 | 11 | **Do not report security vulnerabilities in public GitHub issues.** 12 | 13 | Instead, please send a DM over Discord to WyattL#3477, or alternatively, send a [email instead](mailto:urgent@wyatt.world). 14 | 15 | All reports should have a initial response within 24 hours, and should be fixed within approximately 72 hours. 16 | -------------------------------------------------------------------------------- /build.mjs: -------------------------------------------------------------------------------- 1 | // This file is called prepublish. It is responsible for placing any required files in the 2 | // `./computedgrammar` directory to be bundled with the extension. 3 | // It also generates the `./syntaxes/greyscript.tmLanguage.json` file from the template. 4 | 5 | import fs from 'fs'; 6 | import fetch from 'node-fetch'; 7 | 8 | if (!fs.existsSync(`./computedgrammar`)) fs.mkdirSync(`./computedgrammar`); 9 | 10 | let Template = fs.readFileSync(`./syntaxes/greyscript.tmLanguage.json.template`, `utf8`); 11 | 12 | let FetchFile = async(path, url) => { 13 | let data = await (await fetch(url)).text(); 14 | if (!data || !JSON.parse(data)) throw `${path} invalid data response: ${data}`; 15 | fs.writeFileSync(path, data); 16 | if (path == `./computedgrammar/ReturnData.json`) { 17 | console.log(`good!`) 18 | let jdata = JSON.parse(data); 19 | let classes = []; 20 | let generals = []; 21 | let nongens = []; 22 | for (let i in jdata) { 23 | let d = jdata[i]; 24 | if (i != "General") classes.push(i); 25 | for (let x in d) { 26 | if (i == "General") generals.push(x); 27 | else nongens.push(x); 28 | } 29 | } 30 | Template = Template.replace(`--CLASSES--`, classes.join("|")); 31 | Template = Template.replace(`--GENFUNCTIONS--`, generals.join("|")); 32 | Template = Template.replace(`--NONGENFUNCTIONS--`, nongens.join("|")); 33 | console.log(`Write syntax!`) 34 | fs.writeFileSync(`./syntaxes/greyscript.tmLanguage.json`, Template); 35 | } 36 | }; 37 | 38 | FetchFile(`./computedgrammar/ArgData.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/arguments.json`) 39 | FetchFile(`./computedgrammar/CompletionData.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/functions.json`) 40 | FetchFile(`./computedgrammar/Encryption.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/encryption.json`) 41 | FetchFile(`./computedgrammar/Examples.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/examples.json`) 42 | FetchFile(`./computedgrammar/HoverData.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/descriptions.json`) 43 | FetchFile(`./computedgrammar/Nightly.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/nightly.json`) 44 | FetchFile(`./computedgrammar/ReturnData.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/returns.json`) 45 | FetchFile(`./computedgrammar/TypeData.json`, `https://raw.githubusercontent.com/WyattSL/greydocs/main/_data/types.json`) -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WyattSL/greyscript/a186fb2499ea30303afd9e4c5cfa774aab46f786/icon.png -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | }, 6 | // symbols used as brackets 7 | "brackets": [ 8 | ["{", "}"], 9 | ["[", "]"], 10 | ["(", ")"] 11 | ], 12 | // symbols that are auto closed when typing 13 | "autoClosingPairs": [ 14 | ["{", "}"], 15 | ["[", "]"], 16 | ["(", ")"], 17 | ["\"", "\""] 18 | ], 19 | // symbols that can be used to surround a selection 20 | "surroundingPairs": [ 21 | ["{", "}"], 22 | ["[", "]"], 23 | ["(", ")"], 24 | ["\"", "\""] 25 | ], 26 | "indentationRules": { 27 | "increaseIndentPattern": "(else if .* then|if .* then|(= |=)function|(= |=)function\\(.*\\)|else|else;|while.+|for.+)$", 28 | "decreaseIndentPattern": "(end if|end function|end while|end for)$" 29 | } 30 | } -------------------------------------------------------------------------------- /original-grammar/ArgData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Blockchain": { 3 | "amount_mined": [ 4 | { 5 | "type": "string", 6 | "name": "coinName", 7 | "optional": false 8 | } 9 | ], 10 | "coin_price": [ 11 | { 12 | "type": "string", 13 | "name": "coinName", 14 | "optional": false 15 | } 16 | ], 17 | "create_wallet": [ 18 | { 19 | "type": "string", 20 | "name": "username", 21 | "optional": false 22 | }, 23 | { 24 | "type": "string", 25 | "name": "password", 26 | "optional": false 27 | } 28 | ], 29 | "delete_coin": [ 30 | { 31 | "type": "string", 32 | "name": "coinName", 33 | "optional": false 34 | }, 35 | { 36 | "type": "string", 37 | "name": "username", 38 | "optional": false 39 | }, 40 | { 41 | "type": "string", 42 | "name": "password", 43 | "optional": false 44 | } 45 | ], 46 | "get_coin": [ 47 | { 48 | "type": "string", 49 | "name": "coinName", 50 | "optional": false 51 | }, 52 | { 53 | "type": "string", 54 | "name": "username", 55 | "optional": false 56 | }, 57 | { 58 | "type": "string", 59 | "name": "password", 60 | "optional": false 61 | } 62 | ], 63 | "login_wallet": [ 64 | { 65 | "type": "string", 66 | "name": "username", 67 | "optional": false 68 | }, 69 | { 70 | "type": "string", 71 | "name": "password", 72 | "optional": false 73 | } 74 | ], 75 | "show_history": [ 76 | { 77 | "type": "string", 78 | "name": "coinName", 79 | "optional": false 80 | } 81 | ] 82 | }, 83 | "Wallet": { 84 | "buy_coin": [ 85 | { 86 | "type": "string", 87 | "name": "currencyName", 88 | "optional": false 89 | }, 90 | { 91 | "type": "Number", 92 | "name": "quantity", 93 | "optional": false 94 | }, 95 | { 96 | "type": "Number", 97 | "name": "UnitPrice", 98 | "optional": false 99 | } 100 | ], 101 | "cancel_pending_trade": [ 102 | { 103 | "type": "string", 104 | "name": "currencyName", 105 | "optional": false 106 | } 107 | ], 108 | "get_balance": [ 109 | { 110 | "type": "string", 111 | "name": "coinName", 112 | "optional": false 113 | } 114 | ], 115 | "get_global_offers": [ 116 | { 117 | "type": "string", 118 | "name": "currencyName", 119 | "optional": false 120 | } 121 | ], 122 | "get_pending_trade": [ 123 | { 124 | "type": "string", 125 | "name": "currencyName", 126 | "optional": false 127 | } 128 | ], 129 | "get_pin": [], 130 | "list_coins": [], 131 | "list_global_coins": [], 132 | "reset_password": [ 133 | { 134 | "type": "string", 135 | "name": "newPassword", 136 | "optional": false 137 | } 138 | ], 139 | "sell_coin": [ 140 | { 141 | "type": "string", 142 | "name": "currencyName", 143 | "optional": false 144 | }, 145 | { 146 | "type": "Number", 147 | "name": "quantity", 148 | "optional": false 149 | }, 150 | { 151 | "type": "Number", 152 | "name": "UnitPrice", 153 | "optional": false 154 | } 155 | ], 156 | "show_nodes": [ 157 | { 158 | "type": "string", 159 | "name": "coinName", 160 | "optional": false 161 | } 162 | ] 163 | }, 164 | "Coin": { 165 | "create_subwallet": [ 166 | { 167 | "type": "string", 168 | "name": "walletID", 169 | "optional": false 170 | }, 171 | { 172 | "type": "string", 173 | "name": "pin", 174 | "optional": false 175 | }, 176 | { 177 | "type": "string", 178 | "name": "subWalletUser", 179 | "optional": false 180 | }, 181 | { 182 | "type": "string", 183 | "name": "subWalletPass", 184 | "optional": false 185 | } 186 | ], 187 | "get_address": [], 188 | "get_cycle_mining": [], 189 | "get_mined_coins": [], 190 | "get_reward": [], 191 | "get_subwallet": [ 192 | { 193 | "type": "string", 194 | "name": "subWalletUser", 195 | "optional": false 196 | } 197 | ], 198 | "get_subwallets": [], 199 | "set_address": [ 200 | { 201 | "type": "string", 202 | "name": "address", 203 | "optional": false 204 | } 205 | ], 206 | "set_cycle_mining": [ 207 | { 208 | "type": "Number", 209 | "name": "rateHours", 210 | "optional": false 211 | } 212 | ], 213 | "set_reward": [ 214 | { 215 | "type": "Number", 216 | "name": "coinAmount", 217 | "optional": false 218 | } 219 | ], 220 | "transaction": [ 221 | { 222 | "type": "string", 223 | "name": "origSubWallet", 224 | "optional": false 225 | }, 226 | { 227 | "type": "string", 228 | "name": "destSubWallet", 229 | "optional": false 230 | }, 231 | { 232 | "type": "string", 233 | "name": "amount", 234 | "optional": false 235 | } 236 | ] 237 | }, 238 | "SubWallet": { 239 | "check_password": [ 240 | { 241 | "type": "string", 242 | "name": "subWalletPass", 243 | "optional": false 244 | } 245 | ], 246 | "delete": [], 247 | "get_balance": [], 248 | "get_info": [], 249 | "get_user": [], 250 | "last_transaction": [], 251 | "mining": [], 252 | "set_info": [ 253 | { 254 | "type": "string", 255 | "name": "info", 256 | "optional": false 257 | } 258 | ], 259 | "wallet_username": [] 260 | }, 261 | "Service": { 262 | "install_service": [], 263 | "start_service": [], 264 | "stop_service": [] 265 | }, 266 | "Shell": { 267 | "host_computer": [], 268 | "start_terminal": [], 269 | "build": [ 270 | { 271 | "type": "String", 272 | "name": "pathSource", 273 | "optional": false 274 | }, 275 | { 276 | "type": "String", 277 | "name": "pathBinary", 278 | "optional": false 279 | }, 280 | { 281 | "type": "Number", 282 | "name": "allowImport", 283 | "optional": true 284 | } 285 | ], 286 | "connect_service": [ 287 | { 288 | "type": "String", 289 | "name": "ipAddress", 290 | "optional": false 291 | }, 292 | { 293 | "type": "Number", 294 | "name": "port", 295 | "optional": false 296 | }, 297 | { 298 | "type": "String", 299 | "name": "user", 300 | "optional": false 301 | }, 302 | { 303 | "type": "String", 304 | "name": "password", 305 | "optional": false 306 | }, 307 | { 308 | "type": "String", 309 | "name": "service", 310 | "optional": true 311 | } 312 | ], 313 | "launch": [ 314 | { 315 | "type": "String", 316 | "name": "path", 317 | "optional": false 318 | }, 319 | { 320 | "type": "String", 321 | "name": "args", 322 | "optional": false 323 | } 324 | ], 325 | "ping": [ 326 | { 327 | "type": "String", 328 | "name": "ipAddress", 329 | "optional": false 330 | } 331 | ], 332 | "scp": [ 333 | { 334 | "type": "String", 335 | "name": "pathOrig", 336 | "optional": false 337 | }, 338 | { 339 | "type": "String", 340 | "name": "pathDest", 341 | "optional": false 342 | }, 343 | { 344 | "type": "Shell", 345 | "name": "remoteShell", 346 | "optional": false 347 | } 348 | ], 349 | "masterkey": [ 350 | { 351 | "type": "String", 352 | "name": "ipAddress", 353 | "optional": false 354 | }, 355 | { 356 | "type": "Number", 357 | "name": "Port", 358 | "optional": false 359 | }, 360 | { 361 | "type": "String", 362 | "name": "User", 363 | "optional": false 364 | } 365 | ], 366 | "masterkey_direct": [ 367 | { 368 | "type": "String", 369 | "name": "publicIpAddress", 370 | "optional": false 371 | }, 372 | { 373 | "type": "String", 374 | "name": "localIpAddress", 375 | "optional": false 376 | }, 377 | { 378 | "type": "String", 379 | "name": "User", 380 | "optional": false 381 | } 382 | ], 383 | "restore_network": [ 384 | { 385 | "type": "String", 386 | "name": "publicIpAddress", 387 | "optional": false 388 | } 389 | ] 390 | }, 391 | "AptClient": { 392 | "show": [ 393 | { 394 | "type": "String", 395 | "name": "repository_name", 396 | "optional": false 397 | } 398 | ], 399 | "search": [ 400 | { 401 | "type": "String", 402 | "name": "package_name", 403 | "optional": false 404 | } 405 | ], 406 | "update": [], 407 | "add_repo": [ 408 | { 409 | "type": "String", 410 | "name": "repository_address", 411 | "optional": false 412 | }, 413 | { 414 | "type": "Number", 415 | "name": "port", 416 | "optional": true 417 | } 418 | ], 419 | "del_repo": [ 420 | { 421 | "type": "String", 422 | "name": "repository_address", 423 | "optional": false 424 | } 425 | ], 426 | "install": [ 427 | { 428 | "type": "String", 429 | "name": "package_name", 430 | "optional": false 431 | }, 432 | { 433 | "type": "String", 434 | "name": "install_path", 435 | "optional": true 436 | } 437 | ], 438 | "check_upgrade": [ 439 | { 440 | "type": "String", 441 | "name": "file_path", 442 | "optional": false 443 | } 444 | ] 445 | }, 446 | "MetaMail": { 447 | "delete": [ 448 | { 449 | "type": "String", 450 | "name": "mail_id", 451 | "optional": false 452 | } 453 | ], 454 | "fetch": [], 455 | "read": [ 456 | { 457 | "type": "String", 458 | "name": "mail_id", 459 | "optional": false 460 | } 461 | ], 462 | "send": [ 463 | { 464 | "type": "String", 465 | "name": "address", 466 | "optional": false 467 | }, 468 | { 469 | "type": "String", 470 | "name": "subject", 471 | "optional": false 472 | }, 473 | { 474 | "type": "String", 475 | "name": "message", 476 | "optional": false 477 | } 478 | ] 479 | }, 480 | "FtpShell": { 481 | "host_computer": [], 482 | "start_terminal": [], 483 | "put": [ 484 | { 485 | "type": "String", 486 | "name": "pathOrig", 487 | "optional": false 488 | }, 489 | { 490 | "type": "String", 491 | "name": "pathDest", 492 | "optional": false 493 | }, 494 | { 495 | "type": "Shell", 496 | "name": "remoteShell", 497 | "optional": false 498 | } 499 | ] 500 | }, 501 | "Crypto": { 502 | "aircrack": [ 503 | { 504 | "type": "String", 505 | "name": "pathFile", 506 | "optional": false 507 | } 508 | ], 509 | "airmon": [ 510 | { 511 | "type": "String", 512 | "name": "option", 513 | "optional": false 514 | }, 515 | { 516 | "type": "String", 517 | "name": "device", 518 | "optional": false 519 | } 520 | ], 521 | "aireplay": [ 522 | { 523 | "type": "String", 524 | "name": "bssid", 525 | "optional": false 526 | }, 527 | { 528 | "type": "String", 529 | "name": "essid", 530 | "optional": false 531 | }, 532 | { 533 | "type": "Number", 534 | "name": "maxAcks", 535 | "optional": true 536 | } 537 | ], 538 | "decipher": [ 539 | { 540 | "type": "String", 541 | "name": "encryptedPass", 542 | "optional": false 543 | } 544 | ], 545 | "smtp_user_list": [ 546 | { 547 | "type": "String", 548 | "name": "ipAddress", 549 | "optional": false 550 | }, 551 | { 552 | "type": "Number", 553 | "name": "port", 554 | "optional": false 555 | } 556 | ] 557 | }, 558 | "MetaLib": { 559 | "lib_name": [], 560 | "version": [], 561 | "overflow": [ 562 | { 563 | "type": "String", 564 | "name": "memAddress", 565 | "optional": false 566 | }, 567 | { 568 | "type": "String", 569 | "name": "unsecValue", 570 | "optional": false 571 | }, 572 | { 573 | "type": "String", 574 | "name": "optArgs", 575 | "optional": true 576 | } 577 | ] 578 | }, 579 | "Metaxploit": { 580 | "load": [ 581 | { 582 | "type": "String", 583 | "name": "path", 584 | "optional": false 585 | } 586 | ], 587 | "net_use": [ 588 | { 589 | "type": "String", 590 | "name": "ipAddress", 591 | "optional": false 592 | }, 593 | { 594 | "type": "Number", 595 | "name": "port", 596 | "optional": false 597 | } 598 | ], 599 | "rshell_client": [ 600 | { 601 | "type": "String", 602 | "name": "address", 603 | "optional": false 604 | }, 605 | { 606 | "type": "Number", 607 | "name": "port", 608 | "optional": true 609 | }, 610 | { 611 | "type": "String", 612 | "name": "procName", 613 | "optional": true 614 | } 615 | ], 616 | "rshell_server": [], 617 | "scan_address": [ 618 | { 619 | "type": "MetaLib", 620 | "name": "metaLib", 621 | "optional": false 622 | }, 623 | { 624 | "type": "String", 625 | "name": "memAddress", 626 | "optional": false 627 | } 628 | ], 629 | "scan": [ 630 | { 631 | "type": "MetaLib", 632 | "name": "metaLib", 633 | "optional": false 634 | } 635 | ], 636 | "sniffer": [ 637 | { 638 | "type": "Number", 639 | "name": "saveEncSource", 640 | "optional": false 641 | } 642 | ] 643 | }, 644 | "Port": { 645 | "port_number": [], 646 | "is_closed": [], 647 | "get_lan_ip": [] 648 | }, 649 | "Router": { 650 | "bssid_name": [], 651 | "device_ports": [ 652 | { 653 | "type": "String", 654 | "name": "ipAddress", 655 | "optional": false 656 | } 657 | ], 658 | "devices_lan_ip": [], 659 | "essid_name": [], 660 | "firewall_rules": [], 661 | "kernel_version": [], 662 | "local_ip": [], 663 | "ping_port": [ 664 | { 665 | "type": "Number", 666 | "name": "port", 667 | "optional": false 668 | } 669 | ], 670 | "port_info": [ 671 | { 672 | "type": "Port", 673 | "name": "portObject", 674 | "optional": false 675 | } 676 | ], 677 | "public_ip": [], 678 | "used_ports": [] 679 | }, 680 | "NetSession": { 681 | "dump_lib": [] 682 | }, 683 | "File": { 684 | "chmod": [ 685 | { 686 | "type": "String", 687 | "name": "permission", 688 | "optional": false 689 | }, 690 | { 691 | "type": "Number", 692 | "name": "isRecursive", 693 | "optional": true 694 | } 695 | ], 696 | "copy": [ 697 | { 698 | "type": "String", 699 | "name": "path", 700 | "optional": false 701 | }, 702 | { 703 | "type": "String", 704 | "name": "newName", 705 | "optional": false 706 | } 707 | ], 708 | "move": [ 709 | { 710 | "type": "String", 711 | "name": "path", 712 | "optional": false 713 | }, 714 | { 715 | "type": "String", 716 | "name": "newName", 717 | "optional": false 718 | } 719 | ], 720 | "rename": [ 721 | { 722 | "type": "String", 723 | "name": "newName", 724 | "optional": false 725 | } 726 | ], 727 | "path": [], 728 | "parent": [], 729 | "name": [], 730 | "get_content": [], 731 | "set_content": [ 732 | { 733 | "type": "String", 734 | "name": "content", 735 | "optional": false 736 | } 737 | ], 738 | "is_binary": [], 739 | "has_permission": [ 740 | { 741 | "type": "String", 742 | "name": "permission", 743 | "optional": false 744 | } 745 | ], 746 | "delete": [], 747 | "get_folders": [], 748 | "get_files": [], 749 | "permissions": [], 750 | "owner": [], 751 | "set_owner": [ 752 | { 753 | "type": "String", 754 | "name": "ownerName", 755 | "optional": false 756 | }, 757 | { 758 | "type": "Number", 759 | "name": "isRecursive", 760 | "optional": true 761 | } 762 | ], 763 | "group": [], 764 | "set_group": [ 765 | { 766 | "type": "String", 767 | "name": "groupName", 768 | "optional": false 769 | }, 770 | { 771 | "type": "Number", 772 | "name": "isRecursive", 773 | "optional": true 774 | } 775 | ], 776 | "size": [], 777 | "meta_info": [] 778 | }, 779 | "Computer": { 780 | "get_ports": [], 781 | "File": [ 782 | { 783 | "type": "String", 784 | "name": "path", 785 | "optional": false 786 | } 787 | ], 788 | "create_folder": [ 789 | { 790 | "type": "String", 791 | "name": "path", 792 | "optional": false 793 | }, 794 | { 795 | "type": "String", 796 | "name": "folderName", 797 | "optional": false 798 | } 799 | ], 800 | "is_network_active": [], 801 | "touch": [ 802 | { 803 | "type": "String", 804 | "name": "path", 805 | "optional": false 806 | }, 807 | { 808 | "type": "String", 809 | "name": "fileName", 810 | "optional": false 811 | } 812 | ], 813 | "show_procs": [], 814 | "network_devices": [], 815 | "change_password": [ 816 | { 817 | "type": "String", 818 | "name": "user", 819 | "optional": false 820 | }, 821 | { 822 | "type": "String", 823 | "name": "password", 824 | "optional": false 825 | } 826 | ], 827 | "create_user": [ 828 | { 829 | "type": "String", 830 | "name": "user", 831 | "optional": false 832 | }, 833 | { 834 | "type": "String", 835 | "name": "password", 836 | "optional": false 837 | } 838 | ], 839 | "delete_user": [ 840 | { 841 | "type": "String", 842 | "name": "user", 843 | "optional": false 844 | }, 845 | { 846 | "type": "Number", 847 | "name": "removeHome", 848 | "optional": true 849 | } 850 | ], 851 | "create_group": [ 852 | { 853 | "type": "String", 854 | "name": "user", 855 | "optional": false 856 | }, 857 | { 858 | "type": "String", 859 | "name": "groupName", 860 | "optional": false 861 | } 862 | ], 863 | "delete_group": [ 864 | { 865 | "type": "String", 866 | "name": "user", 867 | "optional": false 868 | }, 869 | { 870 | "type": "String", 871 | "name": "groupName", 872 | "optional": false 873 | } 874 | ], 875 | "groups": [ 876 | { 877 | "type": "String", 878 | "name": "user", 879 | "optional": false 880 | } 881 | ], 882 | "close_program": [ 883 | { 884 | "type": "Number", 885 | "name": "PID", 886 | "optional": false 887 | } 888 | ], 889 | "wifi_networks": [ 890 | { 891 | "type": "String", 892 | "name": "netDevice", 893 | "optional": false 894 | } 895 | ], 896 | "connect_wifi": [ 897 | { 898 | "type": "String", 899 | "name": "netDevice", 900 | "optional": false 901 | }, 902 | { 903 | "type": "String", 904 | "name": "bssid", 905 | "optional": false 906 | }, 907 | { 908 | "type": "String", 909 | "name": "essid", 910 | "optional": false 911 | }, 912 | { 913 | "type": "String", 914 | "name": "password", 915 | "optional": false 916 | } 917 | ], 918 | "connect_ethernet": [ 919 | { 920 | "type": "String", 921 | "name": "netDevice", 922 | "optional": false 923 | }, 924 | { 925 | "type": "String", 926 | "name": "localIp", 927 | "optional": false 928 | }, 929 | { 930 | "type": "String", 931 | "name": "gateway", 932 | "optional": false 933 | } 934 | ], 935 | "network_gateway": [], 936 | "active_net_card": [] 937 | }, 938 | "General": { 939 | "get_custom_object": [], 940 | "mail_login": [ 941 | { 942 | "type": "String", 943 | "name": "user", 944 | "optional": false 945 | }, 946 | { 947 | "type": "String", 948 | "name": "password", 949 | "optional": false 950 | } 951 | ], 952 | "typeof": [ 953 | { 954 | "type": "Any", 955 | "name": "anyObject", 956 | "optional": false 957 | } 958 | ], 959 | "get_router": [ 960 | { 961 | "type": "String", 962 | "name": "ipAddress", 963 | "optional": true 964 | } 965 | ], 966 | "get_switch": [ 967 | { 968 | "type": "String", 969 | "name": "ipAddress", 970 | "optional": false 971 | } 972 | ], 973 | "nslookup": [ 974 | { 975 | "type": "String", 976 | "name": "hostname", 977 | "optional": false 978 | } 979 | ], 980 | "print": [ 981 | { 982 | "type": "String", 983 | "name": "value", 984 | "optional": false 985 | } 986 | ], 987 | "clear_screen": [], 988 | "active_user": [], 989 | "home_dir": [], 990 | "get_shell": [ 991 | { 992 | "type": "String", 993 | "name": "username", 994 | "optional": true 995 | }, 996 | { 997 | "type": "String", 998 | "name": "password", 999 | "optional": true 1000 | } 1001 | ], 1002 | "user_input": [ 1003 | { 1004 | "type": "String", 1005 | "name": "message", 1006 | "optional": false 1007 | }, 1008 | { 1009 | "type": "Number", 1010 | "name": "isPassword", 1011 | "optional": true 1012 | }, 1013 | { 1014 | "type": "Number", 1015 | "name": "anyKey", 1016 | "optional": true 1017 | } 1018 | ], 1019 | "include_lib": [ 1020 | { 1021 | "type": "String", 1022 | "name": "libPath", 1023 | "optional": false 1024 | } 1025 | ], 1026 | "import_code": [ 1027 | { 1028 | "type": "String", 1029 | "name": "absolutePath", 1030 | "optional": false 1031 | } 1032 | ], 1033 | "exit": [ 1034 | { 1035 | "type": "String", 1036 | "name": "message", 1037 | "optional": true 1038 | } 1039 | ], 1040 | "user_mail_address": [], 1041 | "user_bank_number": [], 1042 | "whois": [ 1043 | { 1044 | "type": "String", 1045 | "name": "ipAddress", 1046 | "optional": false 1047 | } 1048 | ], 1049 | "wait": [ 1050 | { 1051 | "type": "Number", 1052 | "name": "seconds", 1053 | "optional": false 1054 | } 1055 | ], 1056 | "command_info": [ 1057 | { 1058 | "type": "String", 1059 | "name": "idCommand", 1060 | "optional": false 1061 | } 1062 | ], 1063 | "program_path": [], 1064 | "current_path": [], 1065 | "format_columns": [ 1066 | { 1067 | "type": "String", 1068 | "name": "columns", 1069 | "optional": false 1070 | } 1071 | ], 1072 | "current_date": [], 1073 | "is_lan_ip": [ 1074 | { 1075 | "type": "String", 1076 | "name": "ipAddress", 1077 | "optional": false 1078 | } 1079 | ], 1080 | "is_valid_ip": [ 1081 | { 1082 | "type": "String", 1083 | "name": "ipAddress", 1084 | "optional": false 1085 | } 1086 | ], 1087 | "bitwise": [ 1088 | { 1089 | "type": "String", 1090 | "name": "operator", 1091 | "optional": false 1092 | }, 1093 | { 1094 | "type": "Number", 1095 | "name": "num1", 1096 | "optional": false 1097 | }, 1098 | { 1099 | "type": "Number", 1100 | "name": "num2", 1101 | "optional": false 1102 | } 1103 | ], 1104 | "abs": [ 1105 | { 1106 | "type": "Number", 1107 | "name": "num", 1108 | "optional": false 1109 | } 1110 | ], 1111 | "acos": [ 1112 | { 1113 | "type": "Number", 1114 | "name": "num", 1115 | "optional": false 1116 | } 1117 | ], 1118 | "asin": [ 1119 | { 1120 | "type": "Number", 1121 | "name": "num", 1122 | "optional": false 1123 | } 1124 | ], 1125 | "atan": [ 1126 | { 1127 | "type": "Number", 1128 | "name": "num", 1129 | "optional": false 1130 | } 1131 | ], 1132 | "tan": [ 1133 | { 1134 | "type": "Number", 1135 | "name": "num", 1136 | "optional": false 1137 | } 1138 | ], 1139 | "cos": [ 1140 | { 1141 | "type": "Number", 1142 | "name": "num", 1143 | "optional": false 1144 | } 1145 | ], 1146 | "sin": [ 1147 | { 1148 | "type": "Number", 1149 | "name": "num", 1150 | "optional": false 1151 | } 1152 | ], 1153 | "char": [ 1154 | { 1155 | "type": "Number", 1156 | "name": "num", 1157 | "optional": false 1158 | } 1159 | ], 1160 | "floor": [ 1161 | { 1162 | "type": "Number", 1163 | "name": "num", 1164 | "optional": false 1165 | } 1166 | ], 1167 | "range": [ 1168 | { 1169 | "type": "Number", 1170 | "name": "start", 1171 | "optional": false 1172 | }, 1173 | { 1174 | "type": "Number", 1175 | "name": "end", 1176 | "optional": true 1177 | }, 1178 | { 1179 | "type": "Number", 1180 | "name": "increment", 1181 | "optional": true 1182 | } 1183 | ], 1184 | "round": [ 1185 | { 1186 | "type": "Number", 1187 | "name": "num", 1188 | "optional": false 1189 | }, 1190 | { 1191 | "type": "Number", 1192 | "name": "decimals", 1193 | "optional": true 1194 | } 1195 | ], 1196 | "rnd": [ 1197 | { 1198 | "type": "Number", 1199 | "name": "seed", 1200 | "optional": true 1201 | } 1202 | ], 1203 | "sign": [ 1204 | { 1205 | "type": "Number", 1206 | "name": "num", 1207 | "optional": false 1208 | } 1209 | ], 1210 | "sqrt": [ 1211 | { 1212 | "type": "Number", 1213 | "name": "num", 1214 | "optional": false 1215 | } 1216 | ], 1217 | "str": [ 1218 | { 1219 | "type": "Number", 1220 | "name": "num", 1221 | "optional": false 1222 | } 1223 | ], 1224 | "ceil": [ 1225 | { 1226 | "type": "Number", 1227 | "name": "num", 1228 | "optional": false 1229 | } 1230 | ], 1231 | "pi": [], 1232 | "hash": [ 1233 | { 1234 | "type": "String", 1235 | "name": "obj", 1236 | "optional": false 1237 | } 1238 | ], 1239 | "launch_path": [], 1240 | "slice": [ 1241 | { 1242 | "type": "Any", 1243 | "name": "sequence", 1244 | "optional": false 1245 | }, 1246 | { 1247 | "type": "Number", 1248 | "name": "from", 1249 | "optional": false 1250 | }, 1251 | { 1252 | "type": "Number", 1253 | "name": "to", 1254 | "optional": true 1255 | } 1256 | ], 1257 | "md5": [ 1258 | { 1259 | "type": "String", 1260 | "name": "value", 1261 | "optional": false 1262 | } 1263 | ], 1264 | "true": [], 1265 | "false": [] 1266 | }, 1267 | "String": { 1268 | "remove": [ 1269 | { 1270 | "type": "String", 1271 | "name": "subString", 1272 | "optional": false 1273 | } 1274 | ], 1275 | "hasIndex": [ 1276 | { 1277 | "type": "Number", 1278 | "name": "index", 1279 | "optional": false 1280 | } 1281 | ], 1282 | "indexOf": [ 1283 | { 1284 | "type": "String", 1285 | "name": "subString", 1286 | "optional": false 1287 | }, 1288 | { 1289 | "type": "Number", 1290 | "name": "startIndex", 1291 | "optional": true 1292 | } 1293 | ], 1294 | "lastIndexOf": [ 1295 | { 1296 | "type": "String", 1297 | "name": "subString", 1298 | "optional": false 1299 | } 1300 | ], 1301 | "split": [ 1302 | { 1303 | "type": "String", 1304 | "name": "delimiter", 1305 | "optional": false 1306 | } 1307 | ], 1308 | "replace": [ 1309 | { 1310 | "type": "String", 1311 | "name": "old", 1312 | "optional": false 1313 | }, 1314 | { 1315 | "type": "String", 1316 | "name": "new", 1317 | "optional": false 1318 | } 1319 | ], 1320 | "trim": [], 1321 | "indexes": [], 1322 | "code": [], 1323 | "len": [], 1324 | "lower": [], 1325 | "upper": [], 1326 | "val": [], 1327 | "values": [], 1328 | "to_int": [] 1329 | }, 1330 | "List": { 1331 | "push": [ 1332 | { 1333 | "type": "Any", 1334 | "name": "value", 1335 | "optional": false 1336 | } 1337 | ], 1338 | "pop": [], 1339 | "shuffle": [], 1340 | "sum": [], 1341 | "hasIndex": [ 1342 | { 1343 | "type": "Number", 1344 | "name": "index", 1345 | "optional": false 1346 | } 1347 | ], 1348 | "indexOf": [ 1349 | { 1350 | "type": "Any", 1351 | "name": "value", 1352 | "optional": false 1353 | } 1354 | ], 1355 | "join": [ 1356 | { 1357 | "type": "String", 1358 | "name": "delimiter", 1359 | "optional": false 1360 | } 1361 | ], 1362 | "sort": [ 1363 | { 1364 | "type": "String", 1365 | "name": "key", 1366 | "optional": true 1367 | } 1368 | ], 1369 | "pull": [], 1370 | "reverse": [], 1371 | "remove": [ 1372 | { 1373 | "type": "Number", 1374 | "name": "index", 1375 | "optional": false 1376 | } 1377 | ], 1378 | "indexes": [], 1379 | "len": [], 1380 | "values": [] 1381 | }, 1382 | "Map": { 1383 | "hasIndex": [ 1384 | { 1385 | "type": "Any", 1386 | "name": "key", 1387 | "optional": false 1388 | } 1389 | ], 1390 | "indexOf": [ 1391 | { 1392 | "type": "Any", 1393 | "name": "value", 1394 | "optional": false 1395 | } 1396 | ], 1397 | "push": [ 1398 | { 1399 | "type": "Any", 1400 | "name": "key", 1401 | "optional": false 1402 | } 1403 | ], 1404 | "pop": [], 1405 | "shuffle": [], 1406 | "remove": [ 1407 | { 1408 | "type": "Any", 1409 | "name": "key", 1410 | "optional": false 1411 | } 1412 | ], 1413 | "indexes": [], 1414 | "len": [], 1415 | "values": [], 1416 | "sum": [] 1417 | } 1418 | } -------------------------------------------------------------------------------- /original-grammar/CompletionData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Blockchain": [ 3 | "amount_mined", 4 | "coin_price", 5 | "create_wallet", 6 | "delete_coin", 7 | "get_coin", 8 | "login_wallet", 9 | "show_history" 10 | ], 11 | "Wallet": [ 12 | "buy_coin", 13 | "cancel_pending_trade", 14 | "get_balance", 15 | "get_global_offers", 16 | "get_pending_trade", 17 | "get_pin", 18 | "list_coins", 19 | "list_global_coins", 20 | "reset_password", 21 | "sell_coin", 22 | "show_nodes" 23 | ], 24 | "Coin": [ 25 | "create_subwallet", 26 | "get_address", 27 | "get_cycle_mining", 28 | "get_mined_coins", 29 | "get_reward", 30 | "get_subwallet", 31 | "get_subwallets", 32 | "set_address", 33 | "set_cycle_mining", 34 | "set_reward", 35 | "transaction" 36 | ], 37 | "SubWallet": [ 38 | "check_password", 39 | "delete", 40 | "get_balance", 41 | "get_info", 42 | "get_user", 43 | "last_transaction", 44 | "mining", 45 | "set_info", 46 | "wallet_username" 47 | ], 48 | "Service": [ 49 | "install_service", 50 | "start_service", 51 | "stop_service" 52 | ], 53 | "Shell": [ 54 | "connect_service", 55 | "start_terminal", 56 | "scp", 57 | "build", 58 | "launch", 59 | "host_computer", 60 | "ping", 61 | "masterkey", 62 | "masterkey_direct", 63 | "restore_network" 64 | ], 65 | "AptClient": [ 66 | "show", 67 | "search", 68 | "update", 69 | "add_repo", 70 | "del_repo", 71 | "install", 72 | "check_upgrade" 73 | ], 74 | "MetaMail": [ 75 | "fetch", 76 | "read", 77 | "send", 78 | "delete" 79 | ], 80 | "FtpShell": [ 81 | "start_terminal", 82 | "host_computer", 83 | "put" 84 | ], 85 | "Crypto": [ 86 | "aircrack", 87 | "airmon", 88 | "aireplay", 89 | "decipher", 90 | "smtp_user_list" 91 | ], 92 | "MetaLib": [ 93 | "lib_name", 94 | "version", 95 | "overflow" 96 | ], 97 | "Metaxploit": [ 98 | "load", 99 | "net_use", 100 | "scan", 101 | "scan_address", 102 | "sniffer", 103 | "rshell_client", 104 | "rshell_server" 105 | ], 106 | "Port": [ 107 | "get_lan_ip", 108 | "is_closed", 109 | "port_number" 110 | ], 111 | "Router": [ 112 | "public_ip", 113 | "local_ip", 114 | "ping_port", 115 | "port_info", 116 | "used_ports", 117 | "device_ports", 118 | "devices_lan_ip", 119 | "essid_name", 120 | "bssid_name", 121 | "kernel_version", 122 | "firewall_rules" 123 | ], 124 | "NetSession": [ 125 | "dump_lib" 126 | ], 127 | "File": [ 128 | "chmod", 129 | "copy", 130 | "move", 131 | "rename", 132 | "path", 133 | "parent", 134 | "name", 135 | "get_content", 136 | "set_content", 137 | "is_binary", 138 | "is_folder", 139 | "has_permission", 140 | "delete", 141 | "get_folders", 142 | "get_files", 143 | "permissions", 144 | "owner", 145 | "set_owner", 146 | "group", 147 | "set_group", 148 | "size", 149 | "meta_info" 150 | ], 151 | "Computer": [ 152 | "get_ports", 153 | "File", 154 | "create_folder", 155 | "is_network_active", 156 | "touch", 157 | "show_procs", 158 | "network_devices", 159 | "change_password", 160 | "create_user", 161 | "delete_user", 162 | "create_group", 163 | "delete_group", 164 | "groups", 165 | "close_program", 166 | "wifi_networks", 167 | "connect_wifi", 168 | "connect_ethernet", 169 | "network_gateway", 170 | "active_net_card", 171 | "local_ip", 172 | "public_ip" 173 | ], 174 | "General": [ 175 | "mail_login", 176 | "print", 177 | "wait", 178 | "time", 179 | "typeof", 180 | "md5", 181 | "get_router", 182 | "get_switch", 183 | "get_shell", 184 | "nslookup", 185 | "whois", 186 | "is_valid_ip", 187 | "is_lan_ip", 188 | "command_info", 189 | "current_date", 190 | "current_path", 191 | "parent_path", 192 | "home_dir", 193 | "program_path", 194 | "active_user", 195 | "user_mail_address", 196 | "user_bank_number", 197 | "format_columns", 198 | "user_input", 199 | "include_lib", 200 | "bitwise", 201 | "clear_screen", 202 | "exit", 203 | "import_code", 204 | "hash", 205 | "launch_path", 206 | "abs", 207 | "acos", 208 | "asin", 209 | "atan", 210 | "tan", 211 | "cos", 212 | "sin", 213 | "char", 214 | "floor", 215 | "range", 216 | "round", 217 | "rnd", 218 | "sign", 219 | "sqrt", 220 | "str", 221 | "ceil", 222 | "pi", 223 | "slice", 224 | "get_custom_object", 225 | "" 226 | ], 227 | "String": [ 228 | "remove", 229 | "hasIndex", 230 | "indexOf", 231 | "lastIndexOf", 232 | "split", 233 | "replace", 234 | "trim", 235 | "indexes", 236 | "code", 237 | "len", 238 | "lower", 239 | "upper", 240 | "val", 241 | "values", 242 | "to_int" 243 | ], 244 | "List": [ 245 | "hasIndex", 246 | "indexOf", 247 | "remove", 248 | "join", 249 | "push", 250 | "pop", 251 | "pull", 252 | "shuffle", 253 | "reverse", 254 | "sort", 255 | "indexes", 256 | "len", 257 | "values", 258 | "sum" 259 | ], 260 | "Map": [ 261 | "hasIndex", 262 | "indexOf", 263 | "push", 264 | "remove", 265 | "indexes", 266 | "len", 267 | "pop", 268 | "shuffle", 269 | "sum", 270 | "values" 271 | ] 272 | } -------------------------------------------------------------------------------- /original-grammar/CompletionTypes.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": 2, 3 | 4 | "pi": 20, 5 | "for": 20, 6 | "while": 20, 7 | "break": 20, 8 | "continue": 20, 9 | "if": 20, 10 | "else": 20, 11 | "end": 20, 12 | "then": 20, 13 | "function": 20, 14 | "true": 20, 15 | "false": 20, 16 | "not": 20, 17 | "null": 20, 18 | 19 | "name": 9, 20 | "get_lan_ip": 9, 21 | "is_closed": 9, 22 | "port_number": 9, 23 | "get_files": 9, 24 | "get_folders": 9, 25 | "size": 9, 26 | "is_folder": 9, 27 | "is_binary": 9, 28 | "group": 9, 29 | "owner": 9, 30 | "permissions": 9, 31 | "user_bank_number": 9, 32 | "user_mail_address": 9, 33 | "time": 9, 34 | "current_date": 9, 35 | "home_dir": 9, 36 | "launch_path": 9, 37 | "program_path": 9, 38 | "parent_path": 9, 39 | "active_user": 9, 40 | "current_path": 9, 41 | "essid_name": 9, 42 | "bssid_name": 9, 43 | "used_ports": 9, 44 | "public_ip": 9, 45 | "local_ip": 9, 46 | "path": 9, 47 | "version": 9, 48 | "lib_name": 9, 49 | "device_ports": 9, 50 | "devices_lan_ip": 9, 51 | "port_info": 9, 52 | "firewall_rules": 9, 53 | "kernel_version": 9, 54 | "parent": 9, 55 | "active_net_card": 9, 56 | "get_ports": 9, 57 | "groups": 9, 58 | "is_network_active": 9, 59 | "network_devices": 9, 60 | "network_gateway": 9, 61 | "host_computer": 9, 62 | 63 | "params": 5 64 | } 65 | -------------------------------------------------------------------------------- /original-grammar/Encryption.json: -------------------------------------------------------------------------------- 1 | [ 2 | "General.md5", 3 | "Computer.touch", 4 | "Crypto.decipher", 5 | "File.copy", 6 | "File.move", 7 | "File.rename", 8 | "File.get_content", 9 | "File.set_content", 10 | "Metaxploit.sniffer", 11 | "Metaxploit.net_use", 12 | "Metalib.scan", 13 | "Metalib.scan_address", 14 | "General.user_input", 15 | "General.clear_screen", 16 | "Shell.connect_service", 17 | "FtpShell.connect_service", 18 | "Shell.start_terminal", 19 | "General.hash", 20 | "Computer.show_procs" 21 | ] -------------------------------------------------------------------------------- /original-grammar/Examples.json: -------------------------------------------------------------------------------- 1 | { 2 | "General": { 3 | "get_shell": [ 4 | "shell = get_shell", 5 | "rootShell = get_shell(\"root\",\"myTotallySecurePassword\")" 6 | ], 7 | "md5": [ 8 | "ciphertext = md5(\"Password\")" 9 | ], 10 | "function": [ 11 | "myFunc = function()\n print(\"Hello World\")\nend function", 12 | "myFunc = function(data)\n print(data)\nend function" 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /original-grammar/HoverData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Blockchain": { 3 | "amount_mined": "Returns an int with the number of units of the coin that have been mined in total.", 4 | "coin_price": "Returns an int with the current unit value of the currency. In case of an error, a string is returned with the details.", 5 | "create_wallet": "Returns an object of type wallet, used to manage cryptocurrencies. In case of a error, a string is returned with the details.", 6 | "delete_coin": "Remove a crypto currency from the world. The credentials used in the creation of the currency are necessary.", 7 | "get_coin": "Returns an object of type Coin used to manage the currency. A string with the details is returned in case of an error.", 8 | "login_wallet": "Returns a wallet type object or a string in the event of an error, indicating the reason.", 9 | "show_history": "Returns a map with the latest changes in the value of a specific currency. The Key of the map is the index represented by an int. Value contains a list, where index 0 is the price of the coin it had in the past, index 1 indicates the date on which the price change occurred." 10 | }, 11 | "Wallet": { 12 | "buy_coin": "Publish a purchase offer indicating the number of coins you wish to buy and the price ($) per unit you are willing to pay. The purchase will be finalized if there is any sale offer with a price less than or equal to the one proposed in the purchase. If there is no eligible offer to sell at that time, the offer to buy will remain publicly visible until a new offer to sell satisfies the requirements. If the publication has been successful, true is returned, in case of error a string with the details is returned.", 13 | "cancel_pending_trade": "Cancel any pending offer of a certain coin.", 14 | "get_balance": "Returns an int with the number of coins of a given currency. In case of error, a string with the details is returned.", 15 | "get_pin": "Returns a string with a PIN that refreshes every few minutes. This PIN is used to obtain an account in cryptocurrency services.", 16 | "list_coins": "Returns a string list with the names of the coins available in the wallet.", 17 | "list_global_coins": "Returns a string list with the names of all the currencies that exist.", 18 | "reset_password": "Change the password of the wallet. Only the account owner can change the password. Returns true if the process completed successfully, in case of error a string with the details is returned", 19 | "sell_coin": "Publish a sale offer indicating the amount of coins you want to sell and the price ($) per unit you want to assign. The sale will be finalized if there is any purchase offer with a price greater than or equal to that proposed in the sale. If there is no existing offer to buy that matches the requirements at that time, the offer to sell will remain publicly visible until a new offer to buy satisfies the requirements. If the publication has been successful, true is returned, in case of error a string with the details is returned.", 20 | "show_nodes": "Returns an int indicating the number of devices mining a specific coin for the same wallet. In case of error a string is returned with the details." 21 | }, 22 | "Coin": { 23 | "create_subwallet": "Register a new account in the Coin that can be used to manage services such as stores. It is necessary to use the PIN that the owner of the wallet that wants to register has to provide.", 24 | "get_address": "Returns the configured address that will be shown to users who do not have the currency, indicating where they have to register.", 25 | "get_cycle_mining": "Returns an int with the number of hours (game time) that each mining cycle lasts. When a cycle ends, it is decided who gets the reward (1 coin) and the next cycle begins.", 26 | "get_mined_coins": "Returns an int with the number of coins that have been mined so far.", 27 | "get_reward": "Returns an int with the number of coins that will be received as a reward after each mining cycle.", 28 | "get_subwallet": "Returns an object of type SubWallet, in case of error it returns a string with the details.", 29 | "get_subwallets": "Returns a list of objects of type SubWallet with all the accounts registered in the crypto currency, in case of error it returns a string with the details.", 30 | "set_address": "Configure a valid address that will be shown to users who do not have the currency, indicating where to register.", 31 | "set_cycle_mining": "Assign the hours (game time) that each mining cycle lasts. When a cycle ends, it is decided who gets the reward (1 coin) and the next cycle begins", 32 | "set_reward": "Assign the reward that miners will receive after each mining cycle", 33 | "transaction": "Make a transaction of the currency between the indicated subwallets. In case of error, a string with the details is returned." 34 | }, 35 | "SubWallet": { 36 | "check_password": "Returns true if the credentials are correct, false otherwise.", 37 | "delete": "Delete the account registered in the crypto currency. Returns true on success or a string with the details of the error. It can return false if the account to be deleted does not exist.", 38 | "get_balance": "Returns an int with the amount of coins that the Subwallet has. In case of error, a string with the details is returned", 39 | "get_info": "Returns a string with the information stored by the coin creator", 40 | "get_user": "Returns a string with the username associated with this subwallet", 41 | "last_transaction": "Returns a list with the information of the last transaction. Index 0 is a string with the other subWallet. Index 1 is an int with the amount. Index 2 is an int with the direction of the transaction (0 Deposit, 1 Withdrawal). Index 3 is a string indicating the date of the transaction", 42 | "mining": "Starts the process of mining the cryptocurrency. The process leaves the terminal busy until a coin is mined, returning true", 43 | "set_info": "Optional information that the coin creator can store in the Subwallet for any use.", 44 | "wallet_username": "Returns a string with the name of the wallet to which this subwallet belongs." 45 | }, 46 | "Service": { 47 | "install_service": "Installs the necessary files for the correct functioning of the service and starts it. Returns true if the installation has been completed successfully, in case of error a string with the details is returned.", 48 | "start_service": "Start the service and open its associated port on the local machine. The service needs portforward in the router to be accessible from the outside. Returns true if the service has started correctly, in case of error a string with the details is returned", 49 | "stop_service": "Stop the service and close its associated port on the local machine. Returns true if the service has been stopped correctly, in case of error a string with the details is returned" 50 | }, 51 | "Shell": { 52 | "host_computer": "Returns the computer associated with the Shell.", 53 | "start_terminal": "Launch an active terminal from the Shell.", 54 | "build": "Compile the source code of the file that is in the provided path, and save the executable in the destination path.\nThe name of the executable is the same as that of the source file without the extension.\nThe provided paths must be absolutes.\n\nReturns a string (empty on success, or with an error on failure)", 55 | "connect_service": "Connect to a remote service. You can specify 'ftp' in the serviceType to request a FtpShell\n\nReturns a Shell or FtpShell if the connection has been established correctly or null on failure.", 56 | "launch": "Launches the command in the provided path.\n\nReturns null on success, or 0 on failure.", 57 | "ping": "Returns true if the remote address could be reached, false otherwise. Firewalls do not block ping requests.", 58 | "scp": "Copy a file from one computer to the other through the network.\n\nReturns 1 on success, or a string (containing an error) on failure.", 59 | "masterkey": "Connect to a remote server, regardless of any security.\n\n**This requires moderator permissions on Multiplayer, and is unavailable in Singleplayer.*", 60 | "masterkey_direct": "Connect to a remote server, regardless of any security. Differences unknown from normal masterkey.\n\n**This requires moderator permissions on Multiplayer, and is unavailable in Singleplayer.*", 61 | "restore_network": "Restore a network to it's original state, presumedly as would be done with ConfigLan.\n\n**This requires moderator permissions on Multiplayer, and is unavailable in Singleplayer.*" 62 | }, 63 | "AptClient": { 64 | "show": "Shows all packages available in repository\nThe repository MUST be added in the /etc/apt/sources.txt file.\n\nReturns string with all pachages on success, or a string (containing an error) on failure.", 65 | "search": "Search specifically for the package in any of the repositories listed in /etc/apt/sources.txt\n\nReturns either a string with information about the package, or a string (containing an error) on failure.", 66 | "update": "Update the list of available packages after adding a new repository in /etc/apt/sources.txt, or if the remote repository has updated its information in /server/conf/repod.conf\n\nReturns string containing all repository addresses with 'Updated' prefix on success, or a string (containing an error) on failure.", 67 | "add_repo": "Add the repository address in the /etc/apt/sources.txt file\n\nReturns empty string on success, or a string (containing an error) on failure.", 68 | "del_repo": "Remove the repository address in the /etc/apt/sources.txt file.\n\nReturns empty string on success, or a string (containing an error) on failure.", 69 | "install": "Install the program or library from a remote repository listed in /etc/apt/sources.txt.\nUnless a path is specified, the program installs in /lib if it is a library or in /bin otherwise\n\nReturns a string (containing an error) on failure or empty on success.", 70 | "check_upgrade": "Check if there is a newer version of the file in the repository.\n\nReturns a string (containing an error) on failure or is empty when succesful." 71 | }, 72 | "MetaMail": { 73 | "delete": "Delete the mail that corresponds with mail_ID.\n\nReturns 1 if it was removed successfully or a string with the error message.", 74 | "fetch": "Get all mails\n\nReturns a string type list of the received emails, with a content preview. In case of error, it returns a string.", 75 | "read": "Read the full mail. The mail_ID argument can be obtained with fetch method.\n\nReturns either the content as a string or an error message.", 76 | "send": "Send a new mail to the indicated recipient.\n\nReturns 1 if the mail has been sent correctly, otherwise returns a string with the error." 77 | }, 78 | "FtpShell": { 79 | "host_computer": "Returns the computer associated with the FtpShell.", 80 | "start_terminal": "Launch an active terminal from the FtpShell.", 81 | "put": "Copy a file from one computer to the other through the network.\n\nReturns 1 on success, or a string (containing an error) on failure." 82 | }, 83 | "Crypto": { 84 | "aircrack": "Returns a string with the password generated from the file created by aireplay.", 85 | "airmon": "Enables or disables the monitor mode of a network device. The option parameter can only be 'start' or 'stop'.", 86 | "aireplay": "Used to inject frames on wireless interfaces.\n\n\n\nOnce the command with Control+C is stopped, it will save the captured information in a text file called file.cap in the path where the terminal is currently located.\n\nAlternatively, a maximum of captured acks can be specified for the command to stop automatically, saving the file.cap file as described above.\n\nIn the event that there is an error, a string will be returned with the message indicating the problem.", 87 | "decipher": "Start the process of decrypting the password.", 88 | "smtp_user_list": "SMTP services are mail services. When using this method with the IP of a mail server, due to a vulnerability in the service, it returns a list of the existing users on the computer where the SMTP service is working. \nIf these users also have an email account registered on the SMTP server, it will be indicated in the list.\n\nReturns a list object of all users on the machine, along with their email address or returns a string containing an error" 89 | }, 90 | "MetaLib": { 91 | "lib_name": "Returns the name of the library.", 92 | "version": "Returns the version of the library.", 93 | "overflow": "Exploits the indicated vulnerability through the buffer overflow method.\nThe object returned can be of various types or even not return anything, so it is advisable to use the typeof method with the object returned.\nDepending on the result, it may be necessary to pass extra arguments so that the exploit runs correctly, for example in the case of a password change." 94 | }, 95 | "Metaxploit": { 96 | "load": "Load the library in memory and return it as a metalib type if the process was successful.", 97 | "net_use": "It connects to the specified address and establishes a null session to gain access to a library remotely.\nThis type of attack is only available for services that work remotely.\nIf no port is specified, it will connect directly to the router.\nIf the process has been executed correctly, an object of type net_session will be returned.", 98 | "rshell_client": "Launches a process on the victim's machine, which silently tries to continuously connect in the background to the specified address and port.\nFor the reverse shell to run successfully, the rshell service must be installed and the portforward configured correctly on the machine where the server is waiting for the victim's connection.", 99 | "rshell_server": "This method returns a list of shell objects that have been reverse shell connected to this machine.\nIn order to manage the connections received, the rshell service must be installed on the machine that receives the victims' connections.", 100 | "scan_address": "It analyzes a specific memory address and shows the vulnerable parts that can be exploited.", 101 | "scan": "Analyze the memory areas occupied by the library in search of vulnerabilities. Returns a list with the affected memory zones.", 102 | "sniffer": "The terminal listens to the network packets of any connection that passes through this device. \nWhen any connection information is captured, it prints a string with the obtained data. \nIt can save the source code of the encode script if saveEncSource is true.\nNull is returned if the listen could not be started." 103 | }, 104 | "Port": { 105 | "port_number": "Returns an number with the configured port number.", 106 | "is_closed": "Returns true if this port is closed, false otherwise.", 107 | "get_lan_ip": "Returns a string with the local IP address of the computer pointed to by this port." 108 | }, 109 | "Router": { 110 | "bssid_name": "Returns a string with the BSSID value of the router.", 111 | "device_ports": "Takes a LAN IP address and returns a list with open ports accessible in the network.", 112 | "devices_lan_ip": "Returns a list with any computer whose gateway is the current device with the ips of the routers and switches that it can reach with a ping. \nSome of the returned addresses could be behind a firewall", 113 | "essid_name": "Returns a string with the ESSID value of the router.", 114 | "firewall_rules": "Returns a string list with the firewall rules present in the router or switch.", 115 | "kernel_version": "Returns a string with the version of the kernel_router.so library", 116 | "local_ip": "Returns a string with the router's local ip address.", 117 | "ping_port": "Returns the port object that is behind the port number provided if exists, null otherwise.", 118 | "port_info": "Returns a string with the information of the port that has been provided. The port provided must not belong to another network than this router.", 119 | "public_ip": "Returns a string with the router's public ip address.", 120 | "used_ports": "Returns an array of ports that are being used in this router." 121 | }, 122 | "NetSession": { 123 | "dump_lib": "Returns the metalib associated with the remote service.\n\n\n\nFor example, connecting to a computer with the ssh service will return a metalib libssh object.\n\nIn the case of connecting to a router, it returns a metalib kernel_router object." 124 | }, 125 | "File": { 126 | "chmod": "Modifies the file's permissions\n\n\n\nTakes a permissions string (e.g. u+wr) and optional recursive flag (int 0 or 1)\n\nIf the file is a folder and the recursive flag is 1, the permissions change will apply recursively, to all the files and folders inside the folder.\n\nReturns a string (empty on success, or with an error on failure)", 127 | "copy": "Copy the file to the specified path.\n\nOn success, returns 1 and the terminal outputs the copied file dialogue. On failure, returns either an error (string) such as permission denied or null (if File object not valid).", 128 | "move": "Move the file to the specified path.\n\nOn success, returns 1. On failure, returns either an error (string) such as permission denied or null (if File object not valid).", 129 | "rename": "Rename the file with the name provided.\n\nReturns a string (empty on success, or with an error on failure)", 130 | "path": "Returns a string with the absolute path of the file.", 131 | "parent": "Returns the folder that contains this file or null if the initial object is /.", 132 | "name": "Returns a string with the name of the file.", 133 | "get_content": "Returns a string with the contents of the text file.", 134 | "set_content": "Save the text in the file. The content will be overwritten if there is already text saved in the file.\n\nReturns 1 on success, or a string (containing an error) on failure", 135 | "is_folder": "Returns true if the file is folder, false otherwise.", 136 | "is_binary": "Returns true if the file is binary, false otherwise.", 137 | "has_permission": "Returns true if the user who launches the script has the necessary permissions.\nThe type_perm parameter is used for reading ('r'), writing ('w') and execution ('x')", 138 | "delete": "Delete the file\n\nReturns a string (empty on success, or with an error on failure)", 139 | "get_folders": "Returns an array of the folders contained in this object. This function is only available if this object is a folder, so it is advisable to first use the is_folder function before calling this method.", 140 | "get_files": "Returns an array of files (excluded folders) contained in this object. This function is only available if this object is a folder, so it is advisable to first use the is_folder function before calling this method.", 141 | "permissions": "Returns a string with the current file permissions.", 142 | "owner": "Returns a string with the name of the file owner.", 143 | "set_owner": "Apply a owner to this file. By default, the owner does not apply recursively. To apply the owner recursively, the optional parameter must be 1.\n\nReturns a string (empty on success, or with an error on failure)", 144 | "group": "Returns a string with the name of the group to which this file belongs.", 145 | "set_group": "Apply a group to this file. By default, the group does not apply recursively. To apply the group recursively, the optional parameter must be 1.\n\nReturns a string (empty on success, or with an error on failure)", 146 | "size": "Returns a string with the size of the file in bytes.", 147 | "meta_info": "Presumedly returns metadata information about a file.\n\n**This requires moderator permissions on Multiplayer, and is unavailable in Singleplayer.*" 148 | }, 149 | "Computer": { 150 | "local_ip": "Returns a string with the computer's local ip address.", 151 | "public_ip": "Returns a string with the computer's public ip address.", 152 | "get_ports": "Returns an array of active ports on the computer.", 153 | "File": "Returns the file located in the given path, relative or absolute. The file returned can be a folder. If the file does not exist, it is returned null.", 154 | "create_folder": "Create a folder in the specified path.", 155 | "is_network_active": "Returns true if the computer has internet access, false otherwise.", 156 | "touch": "Create an empty text file.\n\nReturns 1 on success, or a string (containing an error) on failure", 157 | "show_procs": "Returns a string with the list of active processes on the machine.", 158 | "network_devices": "Returns a string with the list of network devices available on the computer.", 159 | "change_password": "Change the password of an existing user on the machine, for a new one.\nIt is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", 160 | "create_user": "Create a user on the machine, with the specified name and password. It is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", 161 | "delete_user": "Delete the indicated user from the computer, also deleting its home folder optionally. \nBy default, if the optional parameter is not passed, the home folder will not be deleted.\nIt is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", 162 | "create_group": "Create a new group associated with an existing user on the machine. It is necessary to be root to be able to execute the method.\n\nReturns 1 on success, or error string on failure", 163 | "delete_group": "Delete the indicated user group. It is necessary to be root in order to execute this method.\n\nReturns 1 on success, or error string on failure", 164 | "groups": "Returns a string with the list of groups created in the indicated user.", 165 | "close_program": "Close the program associated with the PID. To show the list of the running programs along with their PIDs use the ps command.\n\nReturns 1 on success, 0 if the process cannot be found, or an error string on failure to terminate the process", 166 | "wifi_networks": "Returns a list of the Wi-Fi networks that are available.", 167 | "connect_wifi": "Connect to the indicated Wifi network. Returns true if the connection was successful.\n\nReturns 1 on successful connection, null if the network cannot be found, or an error string on connection failure", 168 | "connect_ethernet": "Notice: Ethernet is currently disabled in multiplayer on both public and nightly builds!\n\nSet up a new IP address on the machine through the ethernet connection.\nReturns a string with the error message if the connection failed. In case of success, an empty string is returned.", 169 | "network_gateway": "Returns a string with the gateway configured on the computer.", 170 | "active_net_card": "Returns a string with the keyword WIFI if the current device is connected to a router by WiFi, if it is connected by cable a string with the keyword ETHERNET is returned." 171 | }, 172 | "General": { 173 | "get_custom_object": "Returns an empty Map object that can be used to share data back and forth with programs launched with shell.launch.", 174 | "mail_login": "Access the email account\n\nReturns a MetaMail type object if the login has been correct. In case of error, it returns a string", 175 | "typeof": "Returns a string with the type of the object passed as a parameter.", 176 | "get_router": "Returns the router whose public IP matches, otherwise returns null.\nIf the ip_address parameter is not specified, returns the router to which the computer executing this command is connected.", 177 | "get_switch": "Returns the switch on the local network whose IP matches, otherwise it returns null.", 178 | "nslookup": "Returns the IP address that is behind the web address that has been provided.", 179 | "print": "Print on the Terminal the message.", 180 | "clear_screen": "Clears all text from the terminal.", 181 | "active_user": "Returns a string with the name of the user who is executing the script.", 182 | "home_dir": "Returns a string with home folder path of the user who is executing the script.", 183 | "get_shell": "Returns the shell that is executing the script if it is called without parameters. \nPassing a username and password, it returns a shell with those credentials if are correct.", 184 | "user_input": "It puts the program on hold to receive the user input, which will be processed as a string. If the password mode is activated, the input text will be hidden with asterisks. If the anyKey argument is true, the entered character will be captured without pressing enter.", 185 | "include_lib": "Includes an external library to be used in scripting. If the library has been included correctly, it will return an object of corresponding type with the library, null otherwise", 186 | "import_code": "Includes external code into the current code. Can be used to split code in multiple files.\nNote: The code will be added to the current code upon compiling.", 187 | "exit": "Stops the execution of the script at the time this method is executed. Optionally you can pass a string as a message that will be printed in the terminal when the program ends.", 188 | "user_mail_address": "Returns a string with the user's email address that is executing this script.\nThis is only defined on a player's home computer.", 189 | "user_bank_number": "Returns a string with the bank account number of the user who is executing this script.\nThis is only defined on a player's home computer.", 190 | "whois": "Shows the administrator information behind the IP provided.", 191 | "wait": "Pauses the script for the indicated time. If duration is not specified, the default value is 1 second.", 192 | "command_info": "Returns the information of common commands of the Operating System, such as mkdir, whois, etc.", 193 | "program_path": "Returns a string with the path of the program that is running at this time.", 194 | "current_path": "It returns a string with the path in which the terminal is at the moment of launching the script.", 195 | "format_columns": "Format the text provided so that it is ordered by columns.", 196 | "current_date": "Returns the time and date.", 197 | "is_lan_ip": "Returns true if the provided address is local, false otherwise. If the provided IP is not valid, it also returns false.", 198 | "is_valid_ip": "Returns true if the provided address is valid, false otherwise.", 199 | "bitwise": "Bitwise operators are used for manipulating data at the bit level.\nBitwise operates on one or more bit patterns or binary numerals at the level of their individual bits. \nThey are used in numerical computations to make the calculation process faster.\nThe operator argument accepts the following operators:\n&, |, ^, <<, >>, >>>", 200 | "hash": "Returns a integer that is \"relatively unique\" to the given value. In the case of strings, the hash is case-sensitive. In the case of a list r map, the hash combines the hash values of all elements.", 201 | "launch_path": "Returns the path of the program that launched this program.", 202 | "abs": "Returns the absolute value of the provided input.", 203 | "acos": "Returns the arccosine of the provided input in radians.", 204 | "asin": "Returns the arcsine of the provided input in radians.", 205 | "atan": "Returns the arctangent of the provided input in radians.", 206 | "tan": "Returns the tangent of the provided input.", 207 | "cos": "Returns the cosine of the provided input.", 208 | "sin": "Returns the sine of the provided input.", 209 | "char": "Returns the unicode character at the provided input's code point.", 210 | "floor": "Returns the provided input floored to it's base integer.", 211 | "range": "Returns a list object containing values from the start to the end, incrementing by increment.", 212 | "round": "Returns the provided input rounded to the decimal place provided.", 213 | "rnd": "Returns a random float between 0 and 1. If seed is provide, it seeds the random number with the given value.", 214 | "sign": "Returns the sign of the provided input.", 215 | "sqrt": "Returns the square root of the provided input.", 216 | "str": "Converts the provided input into a string.", 217 | "ceil": "Returns the provided input raised to the next or equal integer.", 218 | "pi": "Returns 3.14159265358979 (this will probably never be useful!)", 219 | "for": "A for loop can loop over any list, including ones easily created with the range function.", 220 | "while": "Use a while block to loop as long as a condition is true.", 221 | "break": "The break statement jumps out of a while or for loop", 222 | "continue": "The continue statement jumps to the top of the loop, skipping the rest of the current iteration.", 223 | "if": "Use if blocks to do different things depending on some condition.\nYou can include an else or an else if to create conditions for all your needs.", 224 | "else": "Use else blocks to do things if the previous if condition was false.\nAn else block can be chained with an if creating a conditional else block.", 225 | "slice":"Returns the provided string or list from index start to index end.", 226 | "function": "Create a user defined function block where you can run your own snippets of code.", 227 | "then": "Ends the conditioning of an if statement.", 228 | "end": "Ends the provided code block.", 229 | "parent_path": "Returns the path to the parent directory.", 230 | "time": "Returns the number of seconds since the program execution began.", 231 | "true": "A constant value of 1. Easy for return types or the use in an if statement.", 232 | "false": "A constant value of 0. Easy for return types or the use in an if statement." 233 | }, 234 | "String": { 235 | "remove": "Returns the string without the first occurrence of the provided substring.", 236 | "hasIndex": "Returns 1 if the index exists. Returns 0 otherise.", 237 | "indexOf": "Returns the first index of the provided input with the string. Optionally searches after begin. Returns Null if not found.", 238 | "lastIndexOf": "Returns the last index of the provided input with the string. Optionally searches after begin. Returns Null if not found.", 239 | "split": "Returns a list object of substrings.", 240 | "replace": "Returns the string with any instances of new replaced with old.", 241 | "trim": "Returns the string stripped of any spacing at the beginning or end.", 242 | "indexes": "Returns a list object containing indexes of all characters in the string.", 243 | "code": "Returns the unicode code point of the first character in the string.", 244 | "len": "Returns the length of the provided object.", 245 | "lower": "Returns the lowercase string.", 246 | "upper": "Returns the uppercase string.", 247 | "val": "Converts the string to a float.", 248 | "values": "Returns a list object containing values of all characters in the string.", 249 | "to_int": "Converts the string to a integer." 250 | }, 251 | "List": { 252 | "hasIndex": "Returns 1 if the index exists. Returns 0 otherise.", 253 | "indexOf": "Returns the index of the provided value. Optionally searches after begin. Returns Null if not found.", 254 | "push": "Pushes the provided input onto the end of the list. Returns the updated list, and updates the list in it's place.", 255 | "pop": "Returns the last element of the list, and removes that element from the list.", 256 | "pull": "Returns the first element of the list, and removes that element from the list.", 257 | "shuffle": "Randomly remaps values in a list, leaving the keys in their original order.", 258 | "sort": "Sorts a list alphanumerically.", 259 | "join": "Concatenates all items within the list and returns them in a single string.", 260 | "reverse": "Reverses the list, rearranging the element in reverse order.", 261 | "remove": "Returns the list without the first occurrence of the provided input.", 262 | "indexes": "Returns a list object containing the list's indexes", 263 | "len": "Returns the length of the provided object.", 264 | "values": "Returns a list object containing the list's values", 265 | "sum": "Returns the total of all numeric values in a list." 266 | }, 267 | "Map": { 268 | "hasIndex": "Returns 1 if the index exists. Returns 0 otherise.", 269 | "indexOf": "Returns the first index of the provided input with the string. Optionally searches after begin. Returns Null if not found.", 270 | "push": "Pushes the provided input onto the end of the map. Returns the updated map, and updates the map in it's place.", 271 | "pop": "Returns the key of the first element in the map, and removes that element from the map.", 272 | "shuffle": "Randomly remaps values in a map, leaving the keys in their original order.", 273 | "remove": "Returns the map without the first occurrence of the provided input.", 274 | "indexes": "Returns a list object containing the map's indexes.", 275 | "len": "Returns the length of the provided object.", 276 | "values": "Returns a list object containing the map's values.", 277 | "sum": "Returns the total of all numeric values in a map." 278 | } 279 | } -------------------------------------------------------------------------------- /original-grammar/Nightly.json: -------------------------------------------------------------------------------- 1 | [ 2 | "NetSession.get_num_users", 3 | "NetSession.get_num_portforward", 4 | "NetSession.get_num_conn_gateway", 5 | "NetSession.is_any_active_user", 6 | "NetSession.is_root_active_user" 7 | ] -------------------------------------------------------------------------------- /original-grammar/ReturnData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Blockchain": { 3 | "amount_mined": [{ 4 | "type": "Number" 5 | }], 6 | "coin_price": [{ 7 | "type": "Number" 8 | }, 9 | { 10 | "type": "String" 11 | }], 12 | "create_wallet": [{ 13 | "type": "Wallet" 14 | }, 15 | { 16 | "type": "String" 17 | }], 18 | "delete_coin": [ 19 | { 20 | "type": "null" 21 | } 22 | ], 23 | "get_coin": [ 24 | { 25 | "type": "Coin" 26 | }, 27 | { 28 | "type": "String" 29 | } 30 | ], 31 | "login_wallet": [ 32 | { 33 | "type": "Wallet" 34 | }, 35 | { 36 | "type": "String" 37 | } 38 | ], 39 | "show_history": [ 40 | { 41 | "type": "Map" 42 | } 43 | ] 44 | }, 45 | "Wallet": { 46 | "buy_coin": [ 47 | { 48 | "type": "Number" 49 | }, 50 | { 51 | "type": "String" 52 | } 53 | ], 54 | "cancel_pending_trade": [ 55 | { 56 | "type": "null" 57 | } 58 | ], 59 | "get_balance": [ 60 | { 61 | "type": "Number" 62 | }, 63 | { 64 | "type": "String" 65 | } 66 | ], 67 | "get_global_offers": [ 68 | { 69 | "type": "Map" 70 | } 71 | ], 72 | "get_pending_trade": [ 73 | { 74 | "type": "List" 75 | } 76 | ], 77 | "get_pin": [ 78 | { 79 | "type": "String" 80 | } 81 | ], 82 | "list_coins": [ 83 | { 84 | "type": "List", 85 | "subType": "String" 86 | } 87 | ], 88 | "list_global_coins": [ 89 | { 90 | "type": "List", 91 | "subType": "String" 92 | } 93 | ], 94 | "reset_password": [ 95 | { 96 | "type": "Number" 97 | }, 98 | { 99 | "type": "String" 100 | } 101 | ], 102 | "sell_coin": [ 103 | { 104 | "type": "Number" 105 | }, 106 | { 107 | "type": "String" 108 | } 109 | ], 110 | "show_nodes": [ 111 | { 112 | "type": "Number" 113 | }, 114 | { 115 | "type": "String" 116 | } 117 | ] 118 | }, 119 | "Coin": { 120 | "create_subwallet": [ 121 | { 122 | "type": "null" 123 | } 124 | ], 125 | "get_address": [ 126 | { 127 | "type": "String" 128 | } 129 | ], 130 | "get_cycle_mining": [ 131 | { 132 | "type": "Number" 133 | } 134 | ], 135 | "get_mined_coins": [ 136 | { 137 | "type": "Number" 138 | } 139 | ], 140 | "get_reward": [ 141 | { 142 | "type": "Number" 143 | } 144 | ], 145 | "get_subwallet": [ 146 | { 147 | "type": "SubWallet" 148 | } 149 | ], 150 | "get_subwallets": [ 151 | { 152 | "type": "List", 153 | "subType": "SubWallet" 154 | } 155 | ], 156 | "set_address": [ 157 | { 158 | "type": "null" 159 | } 160 | ], 161 | "set_cycle_mining": [ 162 | { 163 | "type": "null" 164 | } 165 | ], 166 | "set_reward": [ 167 | { 168 | "type": "null" 169 | } 170 | ], 171 | "transaction": [ 172 | { 173 | "type": "Number" 174 | }, 175 | { 176 | "type": "String" 177 | } 178 | ] 179 | }, 180 | "SubWallet": { 181 | "check_password": [ 182 | { 183 | "type": "Number" 184 | } 185 | ], 186 | "delete": [ 187 | { 188 | "type": "Number" 189 | }, 190 | { 191 | "type": "String" 192 | } 193 | ], 194 | "get_balance": [ 195 | { 196 | "type": "Number" 197 | }, 198 | { 199 | "type": "String" 200 | } 201 | ], 202 | "get_info": [ 203 | { 204 | "type": "String" 205 | } 206 | ], 207 | "get_user": [ 208 | { 209 | "type": "String" 210 | } 211 | ], 212 | "last_transaction": [ 213 | { 214 | "type": "Map" 215 | } 216 | ], 217 | "mining": [ 218 | { 219 | "type": "null" 220 | } 221 | ], 222 | "set_info": [ 223 | { 224 | "type": "null" 225 | } 226 | ], 227 | "wallet_username": [ 228 | { 229 | "type": "String" 230 | } 231 | ] 232 | }, 233 | "Service": { 234 | "install_service": [{ 235 | "type": "Number" 236 | }, 237 | { 238 | "type": "String" 239 | }], 240 | "start_service": [{ 241 | "type": "Number" 242 | }, 243 | { 244 | "type": "String" 245 | }], 246 | "stop_service": [{ 247 | "type": "Number" 248 | }, 249 | { 250 | "type": "String" 251 | }] 252 | }, 253 | "Shell": { 254 | "host_computer": [ 255 | { 256 | "type": "Computer" 257 | }, 258 | { 259 | "type": "null" 260 | } 261 | ], 262 | "start_terminal": [ 263 | { 264 | "type": "String" 265 | }, 266 | { 267 | "type": "null" 268 | } 269 | ], 270 | "build": [ 271 | { 272 | "type": "Number" 273 | }, 274 | { 275 | "type": "String" 276 | } 277 | ], 278 | "connect_service": [ 279 | { 280 | "type": "Shell" 281 | }, 282 | { 283 | "type": "FtpShell" 284 | }, 285 | { 286 | "type": "String" 287 | } 288 | ], 289 | "launch": [ 290 | { 291 | "type": "Number" 292 | }, 293 | { 294 | "type": "String" 295 | } 296 | ], 297 | "ping": [ 298 | { 299 | "type": "Number" 300 | }, 301 | { 302 | "type": "String" 303 | }, 304 | { 305 | "type": "null" 306 | } 307 | ], 308 | "scp": [ 309 | { 310 | "type": "Number" 311 | }, 312 | { 313 | "type": "String" 314 | }, 315 | { 316 | "type": "null" 317 | } 318 | ], 319 | "masterkey": [ 320 | { "type": "Shell" }, 321 | { "type": "null" } 322 | ], 323 | "masterkey_direct": [ 324 | { "type": "Shell" }, 325 | { "type": "null" } 326 | ], 327 | "restore_network": [ {"type": "Any" }] 328 | }, 329 | "AptClient": { 330 | "show": [ 331 | { 332 | "type": "String" 333 | } 334 | ], 335 | "search": [ 336 | { 337 | "type": "String" 338 | } 339 | ], 340 | "update": [ 341 | { 342 | "type": "String" 343 | } 344 | ], 345 | "add_repo": [ 346 | { 347 | "type": "String" 348 | } 349 | ], 350 | "del_repo": [ 351 | { 352 | "type": "String" 353 | } 354 | ], 355 | "install": [ 356 | { 357 | "type": "String" 358 | } 359 | ], 360 | "check_upgrade": [ 361 | { 362 | "type": "String" 363 | } 364 | ] 365 | }, 366 | "MetaMail": { 367 | "delete": [ 368 | { 369 | "type": "Number" 370 | }, 371 | { 372 | "type": "String" 373 | } 374 | ], 375 | "fetch": [ 376 | { 377 | "type": "List", 378 | "subType": "String" 379 | }, 380 | { 381 | "type": "String" 382 | } 383 | ], 384 | "read": [ 385 | { 386 | "type": "String" 387 | } 388 | ], 389 | "send": [ 390 | { 391 | "type": "Number" 392 | }, 393 | { 394 | "type": "String" 395 | } 396 | ] 397 | }, 398 | "FtpShell": { 399 | "host_computer": [ 400 | { 401 | "type": "Computer" 402 | }, 403 | { 404 | "type": "null" 405 | } 406 | ], 407 | "start_terminal": [ 408 | { 409 | "type": "String" 410 | }, 411 | { 412 | "type": "null" 413 | } 414 | ], 415 | "put": [ 416 | { 417 | "type": "Number" 418 | }, 419 | { 420 | "type": "String" 421 | }, 422 | { 423 | "type": "null" 424 | } 425 | ] 426 | }, 427 | "Crypto": { 428 | "aircrack": [ 429 | { 430 | "type": "String" 431 | }, 432 | { 433 | "type": "null" 434 | } 435 | ], 436 | "airmon": [ 437 | { 438 | "type": "String" 439 | }, 440 | { 441 | "type": "Number" 442 | } 443 | ], 444 | "aireplay": [ 445 | { 446 | "type": "String" 447 | }, 448 | { 449 | "type": "null" 450 | } 451 | ], 452 | "decipher": [ 453 | { 454 | "type": "String" 455 | }, 456 | { 457 | "type": "null" 458 | } 459 | ], 460 | "smtp_user_list": [ 461 | { 462 | "type": "String" 463 | }, 464 | { 465 | "type": "List", 466 | "subType": "String" 467 | }, 468 | { 469 | "type": "null" 470 | } 471 | ] 472 | }, 473 | "MetaLib": { 474 | "lib_name": [ 475 | { 476 | "type": "String" 477 | } 478 | ], 479 | "version": [ 480 | { 481 | "type": "String" 482 | } 483 | ], 484 | "overflow": [ 485 | { 486 | "type": "String" 487 | }, 488 | { 489 | "type": "Number" 490 | }, 491 | { 492 | "type": "Shell" 493 | }, 494 | { 495 | "type": "Computer" 496 | }, 497 | { 498 | "type": "File" 499 | } 500 | ] 501 | }, 502 | "Metaxploit": { 503 | "load": [ 504 | { 505 | "type": "MetaLib" 506 | }, 507 | { 508 | "type": "null" 509 | } 510 | ], 511 | "net_use": [ 512 | { 513 | "type": "NetSession" 514 | }, 515 | { 516 | "type": "null" 517 | } 518 | ], 519 | "rshell_client": [ 520 | { 521 | "type": "Number" 522 | } 523 | ], 524 | "rshell_server": [ 525 | { 526 | "type": "List", 527 | "subType": "Shell" 528 | } 529 | ], 530 | "scan_address": [ 531 | { 532 | "type": "String" 533 | } 534 | ], 535 | "scan": [ 536 | { 537 | "type": "List", 538 | "subType": "String" 539 | } 540 | ], 541 | "sniffer": [ 542 | { 543 | "type": "String" 544 | } 545 | ] 546 | }, 547 | "Port": { 548 | "port_number": [ 549 | { 550 | "type": "Number" 551 | } 552 | ], 553 | "is_closed": [ 554 | { 555 | "type": "Number" 556 | } 557 | ], 558 | "get_lan_ip": [ 559 | { 560 | "type": "String" 561 | } 562 | ] 563 | }, 564 | "Router": { 565 | "bssid_name": [ 566 | { 567 | "type": "String" 568 | } 569 | ], 570 | "device_ports": [ 571 | { 572 | "type": "List", 573 | "subType": "Port" 574 | } 575 | ], 576 | "devices_lan_ip": [ 577 | { 578 | "type": "List", 579 | "subType": "String" 580 | } 581 | ], 582 | "essid_name": [ 583 | { 584 | "type": "String" 585 | } 586 | ], 587 | "firewall_rules": [ 588 | { 589 | "type": "String" 590 | } 591 | ], 592 | "kernel_version": [ 593 | { 594 | "type": "String" 595 | } 596 | ], 597 | "local_ip": [ 598 | { 599 | "type": "String" 600 | } 601 | ], 602 | "ping_port": [ 603 | { 604 | "type": "String" 605 | } 606 | ], 607 | "port_info": [ 608 | { 609 | "type": "String" 610 | } 611 | ], 612 | "public_ip": [ 613 | { 614 | "type": "String" 615 | } 616 | ], 617 | "used_ports": [ 618 | { 619 | "type": "List", 620 | "subType": "Port" 621 | } 622 | ] 623 | }, 624 | "NetSession": { 625 | "dump_lib": [ 626 | { 627 | "type": "MetaLib" 628 | } 629 | ] 630 | }, 631 | "File": { 632 | "chmod": [ 633 | { 634 | "type": "String" 635 | } 636 | ], 637 | "copy": [ 638 | { 639 | "type": "String" 640 | }, 641 | { 642 | "type": "Number" 643 | }, 644 | { 645 | "type": "null" 646 | } 647 | ], 648 | "move": [ 649 | { 650 | "type": "String" 651 | }, 652 | { 653 | "type": "Number" 654 | }, 655 | { 656 | "type": "null" 657 | } 658 | ], 659 | "rename": [ 660 | { 661 | "type": "String" 662 | }, 663 | { 664 | "type": "Number" 665 | }, 666 | { 667 | "type": "null" 668 | } 669 | ], 670 | "path": [ 671 | { 672 | "type": "String" 673 | } 674 | ], 675 | "parent": [ 676 | { 677 | "type": "List", 678 | "subType": "File" 679 | } 680 | ], 681 | "name": [ 682 | { 683 | "type": "String" 684 | } 685 | ], 686 | "get_content": [ 687 | { 688 | "type": "String" 689 | } 690 | ], 691 | "set_content": [ 692 | { 693 | "type": "String" 694 | } 695 | ], 696 | "is_binary": [ 697 | { 698 | "type": "Number" 699 | } 700 | ], 701 | "is_folder": [ 702 | { 703 | "type": "Number" 704 | } 705 | ], 706 | "has_permission": [ 707 | { 708 | "type": "Number" 709 | } 710 | ], 711 | "delete": [ 712 | { 713 | "type": "Number" 714 | } 715 | ], 716 | "get_folders": [ 717 | { 718 | "type": "List", 719 | "subType": "File" 720 | } 721 | ], 722 | "get_files": [ 723 | { 724 | "type": "List", 725 | "subType": "File" 726 | } 727 | ], 728 | "permissions": [ 729 | { 730 | "type": "String" 731 | } 732 | ], 733 | "owner": [ 734 | { 735 | "type": "String" 736 | } 737 | ], 738 | "set_owner": [ 739 | { 740 | "type": "Number" 741 | } 742 | ], 743 | "group": [ 744 | { 745 | "type": "String" 746 | } 747 | ], 748 | "set_group": [ 749 | { 750 | "type": "Number" 751 | } 752 | ], 753 | "size": [ 754 | { 755 | "type": "Number" 756 | } 757 | ], 758 | "meta_info": [ 759 | { "type": "Any" } 760 | ] 761 | }, 762 | "Computer": { 763 | "get_ports": [ 764 | { 765 | "type": "List", 766 | "subType": "Port" 767 | } 768 | ], 769 | "File": [ 770 | { 771 | "type": "File" 772 | }, 773 | { 774 | "type": "null" 775 | } 776 | ], 777 | "create_folder": [ 778 | { 779 | "type": "Number" 780 | } 781 | ], 782 | "is_network_active": [ 783 | { 784 | "type": "Number" 785 | } 786 | ], 787 | "touch": [ 788 | { 789 | "type": "Number" 790 | }, 791 | { 792 | "type": "String" 793 | } 794 | ], 795 | "show_procs": [ 796 | { 797 | "type": "List", 798 | "subType": "String" 799 | } 800 | ], 801 | "network_devices": [ 802 | { 803 | "type": "List", 804 | "subType": "String" 805 | } 806 | ], 807 | "change_password": [ 808 | { 809 | "type": "Number" 810 | } 811 | ], 812 | "create_user": [ 813 | { 814 | "type": "Number" 815 | } 816 | ], 817 | "delete_user": [ 818 | { 819 | "type": "Number" 820 | } 821 | ], 822 | "create_group": [ 823 | { 824 | "type": "Number" 825 | } 826 | ], 827 | "delete_group": [ 828 | { 829 | "type": "Number" 830 | } 831 | ], 832 | "groups": [ 833 | { 834 | "type": "String" 835 | } 836 | ], 837 | "close_program": [ 838 | { 839 | "type": "Number" 840 | } 841 | ], 842 | "wifi_networks": [ 843 | { 844 | "type": "List", 845 | "subType": "String" 846 | } 847 | ], 848 | "connect_wifi": [ 849 | { 850 | "type": "Number" 851 | } 852 | ], 853 | "connect_ethernet": [ 854 | { 855 | "type": "Number" 856 | } 857 | ], 858 | "network_gateway": [ 859 | { 860 | "type": "String" 861 | } 862 | ], 863 | "active_net_card": [ 864 | { 865 | "type": "String" 866 | } 867 | ], 868 | "local_ip": [ 869 | { 870 | "type": "String" 871 | } 872 | ], 873 | "public_ip": [ 874 | { 875 | "type": "String" 876 | } 877 | ] 878 | }, 879 | "General": { 880 | "md5": [ 881 | { 882 | "type": "String" 883 | } 884 | ], 885 | "mail_login": [ 886 | { 887 | "type": "String" 888 | }, 889 | { 890 | "type": "MetaMail" 891 | } 892 | ], 893 | "typeof": [ 894 | { 895 | "type": "String" 896 | } 897 | ], 898 | "get_router": [ 899 | { 900 | "type": "Router" 901 | }, 902 | { 903 | "type": "null" 904 | } 905 | ], 906 | "get_switch": [ 907 | { 908 | "type": "Router" 909 | }, 910 | { 911 | "type": "null" 912 | } 913 | ], 914 | "nslookup": [ 915 | { 916 | "type": "String" 917 | } 918 | ], 919 | "print": [ 920 | { 921 | "type": "Number" 922 | } 923 | ], 924 | "clear_screen": [ 925 | { 926 | "type": "null" 927 | } 928 | ], 929 | "active_user": [ 930 | { 931 | "type": "String" 932 | } 933 | ], 934 | "home_dir": [ 935 | { 936 | "type": "String" 937 | } 938 | ], 939 | "get_shell": [ 940 | { 941 | "type": "Shell" 942 | }, 943 | { 944 | "type": "null" 945 | } 946 | ], 947 | "user_input": [ 948 | { 949 | "type": "String" 950 | } 951 | ], 952 | "include_lib": [ 953 | { 954 | "type": "Crypto" 955 | }, 956 | { 957 | "type": "Metaxploit" 958 | }, 959 | { 960 | "type": "AptClient" 961 | } 962 | ], 963 | "import_code": [ 964 | { 965 | "type": "null" 966 | } 967 | ], 968 | "exit": [ 969 | { 970 | "type": "null" 971 | } 972 | ], 973 | "user_mail_address": [ 974 | { 975 | "type": "String" 976 | } 977 | ], 978 | "user_bank_number": [ 979 | { 980 | "type": "Number" 981 | } 982 | ], 983 | "whois": [ 984 | { 985 | "type": "String" 986 | } 987 | ], 988 | "parent_path": [ 989 | { 990 | "type": "String" 991 | } 992 | ], 993 | "time": [ 994 | { 995 | "type": "Number" 996 | } 997 | ], 998 | "wait": [ 999 | { 1000 | "type": "null" 1001 | } 1002 | ], 1003 | "command_info": [ 1004 | { 1005 | "type": "String" 1006 | } 1007 | ], 1008 | "program_path": [ 1009 | { 1010 | "type": "String" 1011 | } 1012 | ], 1013 | "current_path": [ 1014 | { 1015 | "type": "String" 1016 | } 1017 | ], 1018 | "format_columns": [ 1019 | { 1020 | "type": "String" 1021 | } 1022 | ], 1023 | "current_date": [ 1024 | { 1025 | "type": "String" 1026 | } 1027 | ], 1028 | "is_lan_ip": [ 1029 | { 1030 | "type": "Number" 1031 | } 1032 | ], 1033 | "is_valid_ip": [ 1034 | { 1035 | "type": "Number" 1036 | } 1037 | ], 1038 | "bitwise": [ 1039 | { 1040 | "type": "Number" 1041 | } 1042 | ], 1043 | "hash": [ 1044 | { 1045 | "type": "Number" 1046 | } 1047 | ], 1048 | "launch_path": [ 1049 | { 1050 | "type": "String" 1051 | } 1052 | ], 1053 | "abs": [ 1054 | { 1055 | "type": "Number" 1056 | } 1057 | ], 1058 | "acos": [ 1059 | { 1060 | "type": "Number" 1061 | } 1062 | ], 1063 | "asin": [ 1064 | { 1065 | "type": "Number" 1066 | } 1067 | ], 1068 | "atan": [ 1069 | { 1070 | "type": "Number" 1071 | } 1072 | ], 1073 | "tan": [ 1074 | { 1075 | "type": "Number" 1076 | } 1077 | ], 1078 | "cos": [ 1079 | { 1080 | "type": "Number" 1081 | } 1082 | ], 1083 | "sin": [ 1084 | { 1085 | "type": "Number" 1086 | } 1087 | ], 1088 | "char": [ 1089 | { 1090 | "type": "String" 1091 | } 1092 | ], 1093 | "floor": [ 1094 | { 1095 | "type": "Number" 1096 | } 1097 | ], 1098 | "range": [ 1099 | { 1100 | "type": "List", 1101 | "subType": "Number" 1102 | } 1103 | ], 1104 | "round": [ 1105 | { 1106 | "type": "Number" 1107 | } 1108 | ], 1109 | "rnd": [ 1110 | { 1111 | "type": "Number" 1112 | } 1113 | ], 1114 | "sign": [ 1115 | { 1116 | "type": "Number" 1117 | } 1118 | ], 1119 | "sqrt": [ 1120 | { 1121 | "type": "Number" 1122 | } 1123 | ], 1124 | "str": [ 1125 | { 1126 | "type": "Number" 1127 | } 1128 | ], 1129 | "ceil": [ 1130 | { 1131 | "type": "Number" 1132 | } 1133 | ], 1134 | "pi": [ 1135 | { 1136 | "type": "Number" 1137 | } 1138 | ], 1139 | "slice": [ 1140 | { 1141 | "type": "String" 1142 | }, 1143 | { 1144 | "type": "List", 1145 | "subType": "Any" 1146 | } 1147 | ], 1148 | "true": [ 1149 | { 1150 | "type": "Number" 1151 | } 1152 | ], 1153 | "false": [ 1154 | { 1155 | "type": "Number" 1156 | } 1157 | ] 1158 | }, 1159 | "String": { 1160 | "remove": [ 1161 | { 1162 | "type": "String" 1163 | } 1164 | ], 1165 | "hasIndex": [ 1166 | { 1167 | "type": "Number" 1168 | } 1169 | ], 1170 | "indexOf": [ 1171 | { 1172 | "type": "Number" 1173 | }, 1174 | { 1175 | "type": "null" 1176 | } 1177 | ], 1178 | "lastIndexOf": [ 1179 | { 1180 | "type": "Number" 1181 | } 1182 | ], 1183 | "split": [ 1184 | { 1185 | "type": "List", 1186 | "subType": "String" 1187 | } 1188 | ], 1189 | "replace": [ 1190 | { 1191 | "type": "String" 1192 | } 1193 | ], 1194 | "trim": [ 1195 | { 1196 | "type": "String" 1197 | } 1198 | ], 1199 | "indexes": [ 1200 | { 1201 | "type": "List", 1202 | "subType": "Number" 1203 | } 1204 | ], 1205 | "code": [ 1206 | { 1207 | "type": "Number" 1208 | } 1209 | ], 1210 | "len": [ 1211 | { 1212 | "type": "Number" 1213 | } 1214 | ], 1215 | "lower": [ 1216 | { 1217 | "type": "String" 1218 | } 1219 | ], 1220 | "upper": [ 1221 | { 1222 | "type": "String" 1223 | } 1224 | ], 1225 | "val": [ 1226 | { 1227 | "type": "Number" 1228 | } 1229 | ], 1230 | "values": [ 1231 | { 1232 | "type": "List", 1233 | "subType": "String" 1234 | } 1235 | ], 1236 | "to_int": [ 1237 | { 1238 | "type": "Number" 1239 | } 1240 | ] 1241 | }, 1242 | "List": { 1243 | "hasIndex": [ 1244 | { 1245 | "type": "Number" 1246 | } 1247 | ], 1248 | "indexOf": [ 1249 | { 1250 | "type": "Number" 1251 | }, 1252 | { 1253 | "type": "null" 1254 | } 1255 | ], 1256 | "join": [ 1257 | { 1258 | "type": "String" 1259 | } 1260 | ], 1261 | "push": [ 1262 | { 1263 | "type": "null" 1264 | } 1265 | ], 1266 | "pop": [ 1267 | { 1268 | "type": "Any" 1269 | } 1270 | ], 1271 | "pull": [ 1272 | { 1273 | "type": "Any" 1274 | } 1275 | ], 1276 | "shuffle": [ 1277 | { 1278 | "type": "List" 1279 | } 1280 | ], 1281 | "reverse": [ 1282 | { 1283 | "type": "List" 1284 | } 1285 | ], 1286 | "sort": [ 1287 | { 1288 | "type": "List" 1289 | } 1290 | ], 1291 | "remove": [ 1292 | { 1293 | "type": "List", 1294 | "subType": "Any" 1295 | } 1296 | ], 1297 | "indexes": [ 1298 | { 1299 | "type": "List", 1300 | "subType": "Number" 1301 | } 1302 | ], 1303 | "len": [ 1304 | { 1305 | "type": "Number" 1306 | } 1307 | ], 1308 | "values": [ 1309 | { 1310 | "type": "List", 1311 | "subType": "Any" 1312 | } 1313 | ], 1314 | "sum": [ 1315 | { 1316 | "type": "Number" 1317 | } 1318 | ] 1319 | }, 1320 | "Map": { 1321 | "hasIndex": [ 1322 | { 1323 | "type": "Number" 1324 | } 1325 | ], 1326 | "indexOf": [ 1327 | { 1328 | "type": "Number" 1329 | }, 1330 | { 1331 | "type": "null" 1332 | } 1333 | ], 1334 | "push": [ 1335 | { 1336 | "type": "null" 1337 | } 1338 | ], 1339 | "pop": [ 1340 | { 1341 | "type": "Any" 1342 | } 1343 | ], 1344 | "shuffle": [ 1345 | { 1346 | "type": "Map" 1347 | } 1348 | ], 1349 | "remove": [ 1350 | { 1351 | "type": "List", 1352 | "subType": "Any" 1353 | } 1354 | ], 1355 | "indexes": [ 1356 | { 1357 | "type": "List", 1358 | "subType": "Any" 1359 | } 1360 | ], 1361 | "len": [ 1362 | { 1363 | "type": "Number" 1364 | } 1365 | ], 1366 | "values": [ 1367 | { 1368 | "type": "List" 1369 | } 1370 | ], 1371 | "sum": [ 1372 | { 1373 | "type": "Number" 1374 | } 1375 | ] 1376 | } 1377 | } -------------------------------------------------------------------------------- /original-grammar/TypeData.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_custom_objet": "general", 3 | 4 | "amount_mined": "blockchain", 5 | "coin_price": "blockchain", 6 | "create_wallet": "blockchain", 7 | "delete_coin": "blockchain", 8 | "get_coin": "blockchain", 9 | "login_wallet": "blockchain", 10 | "show_history": "blockchain", 11 | 12 | "buy_coin": "wallet", 13 | "cancel_pending_trade": "wallet", 14 | "get_balance": "wallet", 15 | "get_global_offers": "wallet", 16 | "get_pending_trade": "wallet", 17 | "get_pin": "wallet", 18 | "list_coins": "wallet", 19 | "list_global_coins": "wallet", 20 | "reset_password": "wallet", 21 | "sell_coin": "wallet", 22 | "show_nodes": "wallet", 23 | 24 | "create_subwallet": "coin", 25 | "get_address": "coin", 26 | "get_cycle_mining": "coin", 27 | "get_mined_coins": "coin", 28 | "get_reward": "coin", 29 | "get_subwallet": "coin", 30 | "get_subwallets": "coin", 31 | "set_address": "coin", 32 | "set_cycle_mining": "coin", 33 | "set_reward": "coin", 34 | "transaction": "coin", 35 | 36 | "check_password": "subwallet", 37 | "delete": "subwallet", 38 | "get_balance": "subwallet", 39 | "get_info": "subwallet", 40 | "get_user": "subwallet", 41 | "last_transaction": "subwallet", 42 | "mining": "subwallet", 43 | "set_info": "subwallet", 44 | "wallet_username": "subwallet", 45 | 46 | "install_service": "service", 47 | "start_service": "service", 48 | "stop_service": "service", 49 | 50 | "host_computer": "shell", 51 | "start_terminal": "shell", 52 | "build": "shell", 53 | "connect_service": "shell", 54 | "launch": "shell", 55 | "ping": "shell", 56 | "scp": "shell", 57 | "masterkey": "shell", 58 | "masterkey_direct": "shell", 59 | "restore_network": "shell", 60 | 61 | "show": "aptclient", 62 | "search": "aptclient", 63 | "update": "aptclient", 64 | "add_repo": "aptclient", 65 | "del_repo": "aptclient", 66 | "install": "aptclient", 67 | "check_upgrade": "aptclient", 68 | 69 | "put": "ftpshell", 70 | 71 | "aircrack": "crypto", 72 | "airmon": "crypto", 73 | "aireplay": "crypto", 74 | "decipher": "crypto", 75 | "smtp_user_list": "crypto", 76 | 77 | "login": "libmail", 78 | 79 | "fetch": "metamail", 80 | "read": "metamail", 81 | "send": "metamail", 82 | 83 | "lib_name": "metalib", 84 | "version": "metalib", 85 | "overflow": "metalib", 86 | 87 | "load": "metaxploit", 88 | "net_use": "metaxploit", 89 | "rshell_client": "metaxploit", 90 | "rshell_server": "metaxploit", 91 | "scan_address": "metaxploit", 92 | "scan": "metaxploit", 93 | "sniffer": "metaxploit", 94 | 95 | "port_number": "port", 96 | "is_closed": "port", 97 | "get_lan_ip": "port", 98 | 99 | "bssid_name": "router", 100 | "device_ports": "router", 101 | "devices_lan_ip": "router", 102 | "essid_name": "router", 103 | "firewall_rules": "router", 104 | "kernel_version": "router", 105 | "local_ip": "router", 106 | "ping_port": "router", 107 | "port_info": "router", 108 | "public_ip": "router", 109 | "used_ports": "router", 110 | 111 | "dump_lib": "netsession", 112 | 113 | "chmod": "file", 114 | "copy": "file", 115 | "move": "file", 116 | "rename": "file", 117 | "path": "file", 118 | "parent": "file", 119 | "name": "file", 120 | "get_content": "file", 121 | "set_content": "file", 122 | "is_binary": "file", 123 | "has_permission": "file", 124 | "delete": "file", 125 | "get_folders": "file", 126 | "get_files": "file", 127 | "permissions": "file", 128 | "owner": "file", 129 | "set_owner": "file", 130 | "group": "file", 131 | "set_group": "file", 132 | "size": "file", 133 | "meta_info": "file", 134 | 135 | "get_ports": "computer", 136 | "File": "computer", 137 | "create_folder": "computer", 138 | "is_network_active": "computer", 139 | "touch": "computer", 140 | "show_procs": "computer", 141 | "network_devices": "computer", 142 | "change_password": "computer", 143 | "create_user": "computer", 144 | "delete_user": "computer", 145 | "create_group": "computer", 146 | "delete_group": "computer", 147 | "groups": "computer", 148 | "close_program": "computer", 149 | "wifi_networks": "computer", 150 | "connect_wifi": "computer", 151 | "connect_ethernet": "computer", 152 | "network_gateway": "computer", 153 | "active_net_card": "computer", 154 | 155 | "typeof": "general", 156 | "get_router": "general", 157 | "get_switch": "general", 158 | "nslookup": "general", 159 | "print": "general", 160 | "clear_screen": "general", 161 | "active_user": "general", 162 | "home_dir": "general", 163 | "get_shell": "general", 164 | "user_input": "general", 165 | "include_lib": "general", 166 | "import_code": "general", 167 | "exit": "general", 168 | "user_mail_address": "general", 169 | "user_bank_number": "general", 170 | "whois": "general", 171 | "wait": "general", 172 | "command_info": "general", 173 | "program_path": "general", 174 | "current_path": "general", 175 | "format_columns": "general", 176 | "current_date": "general", 177 | "is_lan_ip": "general", 178 | "is_valid_ip": "general", 179 | "bitwise": "general", 180 | 181 | "abs": "general", 182 | "acos": "general", 183 | "asin": "general", 184 | "atan": "general", 185 | "tan": "general", 186 | "cos": "general", 187 | "sin": "general", 188 | "char": "general", 189 | "floor": "general", 190 | "range": "general", 191 | "round": "general", 192 | "rnd": "general", 193 | "sign": "general", 194 | "sqrt": "general", 195 | "str": "general", 196 | "ceil": "general", 197 | "pi": "general", 198 | 199 | "remove": "string", 200 | "hasIndex": "string", 201 | "indexOf": "string", 202 | "lastIndexOf": "string", 203 | "slice": "string", 204 | "split": "string", 205 | "replace": "string", 206 | "trim": "string", 207 | "indexes": "string", 208 | "code": "string", 209 | "len": "string", 210 | "lower": "string", 211 | "upper": "string", 212 | "val": "string", 213 | "values": "string", 214 | "to_int": "string", 215 | 216 | "push": "map", 217 | "pop": "map", 218 | "shuffle": "map", 219 | "sum": "map", 220 | 221 | "sort": "list", 222 | "join": "list", 223 | "reverse": "list" 224 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "greyscript", 3 | "displayName": "GreyScript", 4 | "description": "Syntax highlighting (and more!) for GreyScript.", 5 | "publisher": "WyattL", 6 | "author": { 7 | "name": "Wyatt", 8 | "email": "urgent@wyatt.world", 9 | "url": "https://github.com/WyattSL" 10 | }, 11 | "icon": "icon.png", 12 | "version": "3.0.8", 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/WyattSL/greyscript.git" 16 | }, 17 | "devDependencies": { 18 | "esbuild": "^0.13.12", 19 | "node-fetch": "^3.3.1", 20 | "vsce": "^2.15.0", 21 | "webpack": "^5.61.0", 22 | "webpack-cli": "^4.9.1" 23 | }, 24 | "scripts": { 25 | "vscode:prepublish-unminified": "node ./build.mjs && npm run esbuild-base -- ", 26 | "vscode:prepublish": "node ./build.mjs && npm run esbuild-base --", 27 | "esbuild-base": "esbuild ./extension.js --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node", 28 | "esbuild": "npm run esbuild-base -- --sourcemap", 29 | "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch" 30 | }, 31 | "homepage": "https://github.com/WyattSL/greyscript/blob/main/CHANGELOG.md", 32 | "engines": { 33 | "vscode": "^1.75.0" 34 | }, 35 | "categories": [ 36 | "Programming Languages" 37 | ], 38 | "browser": "./out/main.js", 39 | "qna": "false", 40 | "bugs": { 41 | "url": "https://github.com/WyattSL/greyscript/issues", 42 | "email": "wyattlipscomb20@gmail.com" 43 | }, 44 | "activationEvents": [], 45 | "contributes": { 46 | "languages": [ 47 | { 48 | "id": "greyscript", 49 | "aliases": [ 50 | "GreyScript", 51 | "greyscript" 52 | ], 53 | "extensions": [ 54 | ".src", 55 | ".gs" 56 | ], 57 | "configuration": "./language-configuration.json" 58 | } 59 | ], 60 | "grammars": [ 61 | { 62 | "language": "greyscript", 63 | "scopeName": "text.miniscript.greyscript", 64 | "path": "./syntaxes/greyscript.tmLanguage.json" 65 | } 66 | ], 67 | "commands": [ 68 | { 69 | "command": "greyScript.gotoError", 70 | "title": "GreyScript: Goto Error" 71 | }, 72 | { 73 | "command": "greyscript.minify", 74 | "title": "GreyScript: Minify" 75 | } 76 | ], 77 | "configuration": { 78 | "title": "GreyScript", 79 | "properties": { 80 | "greyscript.autocomplete": { 81 | "type": "boolean", 82 | "default": true, 83 | "description": "Enable GreyScript's built-in autocomplete.", 84 | "order": 1 85 | }, 86 | "greyscript.hoverdocs": { 87 | "type": "boolean", 88 | "default": true, 89 | "description": "Enable GreyScript's hover-for-documentation.", 90 | "order": 2 91 | }, 92 | "greyscript.colorpicker": { 93 | "type": "boolean", 94 | "default": true, 95 | "description": "Enable GreyScript's color picker.", 96 | "order": 3 97 | }, 98 | "greyscript.symbols": { 99 | "type": "boolean", 100 | "default": true, 101 | "description": "Enable GreyScript's symbol outline.", 102 | "order": 4 103 | }, 104 | "greyscript.remoteSymbols": { 105 | "type": "boolean", 106 | "default": true, 107 | "description": "Search imported files for symbols. (May be slow)", 108 | "order": 5 109 | }, 110 | "greyscript.remoteGrammar": { 111 | "type": "boolean", 112 | "default": true, 113 | "description": "Attempt to update grammar definitions automagically from the Greydocs github repository.", 114 | "order": 6 115 | }, 116 | "greyscript.semanticsProvider": { 117 | "type": "boolean", 118 | "default": true, 119 | "description": "Use the new semantic provider for syntax highlighting.", 120 | "order": 7 121 | } 122 | } 123 | }, 124 | "snippets": [ 125 | { 126 | "language": "greyscript", 127 | "path": "./snippets/main.json" 128 | } 129 | ] 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /snippets/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "If": { 3 | "scope": "greyscript", 4 | "prefix": "if", 5 | "body": [ 6 | "if $1 then", 7 | "$0", 8 | "end if", 9 | ], 10 | "description": "If snippet" 11 | }, 12 | "If-Else": { 13 | "scope": "greyscript", 14 | "prefix": "ife", 15 | "body": [ 16 | "if $1 then", 17 | "$2", 18 | "else", 19 | "$0", 20 | "end if", 21 | ], 22 | "description": "If else snippet" 23 | }, 24 | "If-Else-If": { 25 | "scope": "greyscript", 26 | "prefix": "eli", 27 | "body": [ 28 | "if $1 then", 29 | "$2", 30 | "else if $3 then", 31 | "$4", 32 | "else", 33 | "$0", 34 | "end if", 35 | ], 36 | "description": "If else snippet" 37 | }, 38 | "Short-If": { 39 | "scope": "greyscript", 40 | "prefix": "if", 41 | "body": [ 42 | "if $1 then $2", 43 | ], 44 | "description": "Short If snippet" 45 | }, 46 | 47 | "Ternary": { 48 | "scope": "greyscript", 49 | "prefix": "ter", 50 | "body": [ 51 | "if $1 then $2 else $0", 52 | ], 53 | "description": "Ternary if-else snippet" 54 | }, 55 | "For-Loop": { 56 | "scope": "greyscript", 57 | "prefix": "for", 58 | "body": [ 59 | "for i in $1", 60 | "$0", 61 | "end for", 62 | ], 63 | "description": "For Loop Snippet" 64 | }, 65 | "While-Loop": { 66 | "scope": "greyscript", 67 | "prefix": "whi", 68 | "body": [ 69 | "while $1", 70 | "$0", 71 | "end while", 72 | ], 73 | "description": "For Loop Snippet" 74 | }, 75 | "Continue": { 76 | "scope": "greyscript", 77 | "prefix": "con", 78 | "body": [ 79 | "continue", 80 | ], 81 | "description": "Continue Snippet" 82 | }, 83 | "Break": { 84 | "scope": "greyscript", 85 | "prefix": "bre", 86 | "body": [ 87 | "break", 88 | ], 89 | "description": "Break Snippet" 90 | }, 91 | "Return": { 92 | "scope": "greyscript", 93 | "prefix": "ret", 94 | "body": [ 95 | "return", 96 | ], 97 | "description": "Return Snippet" 98 | }, 99 | "Function": { 100 | "scope": "greyscript", 101 | "prefix": "fun", 102 | "body": [ 103 | "function($1)", 104 | "$0", 105 | "end function", 106 | ], 107 | "description": "Function Snippet" 108 | }, 109 | "Range": { 110 | "scope": "greyscript", 111 | "prefix": "ran", 112 | "body": [ 113 | "range($0)", 114 | ], 115 | "description": "Range function Snippet" 116 | }, 117 | } 118 | -------------------------------------------------------------------------------- /syntaxes/greyscript.tmLanguage.json.old: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "name": "GreyScript", 4 | "patterns": [ 5 | { 6 | "include": "#keywords" 7 | }, 8 | { 9 | "include": "#strings" 10 | }, 11 | { 12 | "include": "#number" 13 | }, 14 | { 15 | "include": "#comment" 16 | } 17 | ], 18 | "repository": { 19 | "keywords": { 20 | "patterns": [ 21 | { 22 | "name": "k", 23 | "match": "\\b(if|while|for|function|then|return|end if|end for|end while|end function|else|and|or|in|not|continue|break|new|null)\\b" 24 | }, 25 | { 26 | "name": "support.class", 27 | "match": "\\b(--CLASSES--)\\b" 28 | }, 29 | { 30 | "name": "support.function", 31 | "match": "\\.\\b(--NONGENFUNCTIONS--)\\b" 32 | }, 33 | { 34 | "name": "support.function", 35 | "match": "\\b(--GENFUNCTIONS--)\\b" 36 | }, 37 | { 38 | "name": "support.type", 39 | "match": "\\b(params|true|false|globals|self|locals)\\b" 40 | } 41 | ] 42 | }, 43 | "strings": { 44 | "name": "string.quoted.double.greyscript", 45 | "begin": "\"", 46 | "end": "\"" 47 | }, 48 | "number": { 49 | "patterns": [{ 50 | "name": "constant.numeric", 51 | "match": "\\d" 52 | }] 53 | }, 54 | "comment": { 55 | "name": "comment.line", 56 | "begin": "//", 57 | "end": "\n" 58 | } 59 | }, 60 | "scopeName": "source.src" 61 | } 62 | -------------------------------------------------------------------------------- /syntaxes/greyscript.tmLanguage.json.oldest: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "name": "GreyScript", 4 | "patterns": [ 5 | { 6 | "include": "#keywords" 7 | }, 8 | { 9 | "include": "#strings" 10 | }, 11 | { 12 | "include": "#number" 13 | }, 14 | { 15 | "include": "#comment" 16 | } 17 | ], 18 | "repository": { 19 | "keywords": { 20 | "patterns": [ 21 | { 22 | "name": "keyword.control.greyscript", 23 | "match": "\\b(if|while|for|function|then|return|end if|end for|end while|end function|else|and|or|in|not|continue|break|new|null)\\b" 24 | }, 25 | { 26 | "name": "support.class", 27 | "match": "\\b(Shell|FtpShell|Computer|File|Router|NetSession|Metaxploit|MetaMail|Metalib|Port|Crypto|int|float|number|string|String|Int|Float|Number|bool|map|Map|list|List)\\b" 28 | }, 29 | { 30 | "name": "support.variable.shell", 31 | "match": "\\.\\b(host_computer)\\b" 32 | }, 33 | { 34 | "name": "support.function.shell", 35 | "match": "\\.\\b(scp|start_terminal|build|connect_service|launch|ping)\\b" 36 | }, 37 | { 38 | "name": "support.function.aptclient", 39 | "match": "\\.\\b(show|search|update|add_repo|del_repo|install|check_upgrade)\\b" 40 | }, 41 | { 42 | "name": "support.function.metamail", 43 | "match": "\\.\\b(delete|fetch|read|send)\\b" 44 | }, 45 | { 46 | "name": "support.variable.ftpshell", 47 | "match": "\\.\\b(host_computer)\\b" 48 | }, 49 | { 50 | "name": "support.function.ftpshell", 51 | "match": "\\.\\b(start_terminal|put)\\b" 52 | }, 53 | { 54 | "name": "support.variable.computer", 55 | "match": "\\.\\b(public_ip|local_ip|active_net_card|get_ports|groups|is_network_active|network_devices|network_gateway)\\b" 56 | }, 57 | { 58 | "name": "support.function.computer", 59 | "match": "\\.\\b(File|touch|create_user|delete_user|create_group|delete_group|change_password|close_program|connect_ethernet|connect_wifi|wifi_networks|create_folder|show_procs)\\b" 60 | }, 61 | { 62 | "name": "support.variable.file", 63 | "match": "\\.\\b(is_binary|is_folder|size|name|owner|parent|group|permissions|path|allow_import)\\b" 64 | }, 65 | { 66 | "name": "support.function.file", 67 | "match": "\\.\\b(delete|set_content|get_content|set_group|set_owner|get_files|get_folders|has_permission|chmod|rename|move|copy)\\b" 68 | }, 69 | { 70 | "name": "support.function.metaxploit", 71 | "match": "\\.\\b(load|net_use|scan_address|scan|sniffer|rshell_server|rshell_client)\\b" 72 | }, 73 | { 74 | "name": "support.variable.metalib", 75 | "match": "\\.\\b(lib_name|version)\\b" 76 | }, 77 | { 78 | "name": "support.function.metalib", 79 | "match": "\\.\\b(overflow)\\b" 80 | }, 81 | { 82 | "name": "support.function.crypto", 83 | "match": "\\.\\b(aircrack|airmon|decipher|smtp_user_list|aireplay)\\b" 84 | }, 85 | { 86 | "name": "support.variable.port", 87 | "match": "\\.\\b(get_lan_ip|is_closed|port_number)\\b" 88 | }, 89 | { 90 | "name": "support.function.netsession", 91 | "match": "\\.\\b(dump_lib)\\b" 92 | }, 93 | { 94 | "name": "support.variable.router", 95 | "match": "\\.\\b(public_ip|local_ip|device_ports|devices_lan_ip|port_info|used_ports|bssid_name|essid_name|firewall_rules|kernel_version)\\b" 96 | }, 97 | { 98 | "name": "support.function.router", 99 | "match": "\\.\\b(ping_port)\\b" 100 | }, 101 | { 102 | "name": "support.variable.general", 103 | "match": "\\b(time|current_date|parent_path|home_dir|program_path|active_user|user_mail_address|user_bank_number|current_path|launch_path)\\b" 104 | }, 105 | { 106 | "name": "support.function.general", 107 | "match": "\\b(clear_screen|print|typeof|md5|get_switch|get_router|get_shell|nslookup|whois|is_valid_ip|is_lan_ip|command_info|format_columns|user_input|include_lib|import_code|exit|bitwise|wait|hash|mail_login|get_custom_object)\\b" 108 | }, 109 | { 110 | "name": "support.function", 111 | "match": "((\\b(slice|abs|acos|asin|atan|tan|cos|sin|char|floor|round|range|rnd|sign|sqrt|str|ceil)\\(|\\.(split|indexOf|hasIndex|lower\b|upper\b|remove|lastIndexOf|replace|trim|indexes\b|code\b|len\b|val\b|values\b|to_int\b|join|push|pop|pull|shuffle|reverse|sort|sum\b))|\bpi\b)" 112 | }, 113 | { 114 | "name": "support.type", 115 | "match": "\\b(params|true|false|globals|self)\\b" 116 | } 117 | ] 118 | }, 119 | "strings": { 120 | "name": "string.quoted.double.greyscript", 121 | "begin": "\"", 122 | "end": "\"" 123 | }, 124 | "number": { 125 | "patterns": [{ 126 | "name": "constant.numeric", 127 | "match": "\\d" 128 | }] 129 | }, 130 | "comment": { 131 | "name": "comment.line", 132 | "begin": "//", 133 | "end": "\n" 134 | } 135 | }, 136 | "scopeName": "source.src" 137 | } 138 | -------------------------------------------------------------------------------- /syntaxes/greyscript.tmLanguage.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "scopeName": "text.miniscript.greyscript", 4 | "name": "greyscript", 5 | "patterns": [ 6 | { 7 | "name": "comment.line.double-dash", 8 | "begin": "\\/\\/", 9 | "end": "$", 10 | "patterns": [{ 11 | "name": "storage.modifier", 12 | "match": "(?<=\\s*\/\/\\s*)@(param|author|example|return|deprecated|readonly|description)(?=\\s+.*)" 13 | }] 14 | }, 15 | { 16 | "name": "support.function", 17 | "match": "\\b(--GENFUNCTIONS--)\\b" 18 | }, 19 | { 20 | "name": "entity.name.function.member", 21 | "match": "\\b(--NONGENFUNCTIONS--)\\b" 22 | }, 23 | { 24 | "name": "support.class", 25 | "match": "\\b(--CLASSES--)\\b" 26 | }, 27 | { 28 | "name": "string.quoted.double", 29 | "begin": "\"", 30 | "end": "\"" 31 | }, 32 | { 33 | "name": "constant.numeric", 34 | "match": "\\b(\\d+)\\b" 35 | }, 36 | { 37 | "name": "keyword.control", 38 | "match": "\\b(if|else|while|then|for|in|return|break|continue|function|end if|end function|end for|end while)\\b" 39 | }, 40 | { 41 | "name": "keyword.operator", 42 | "match": "\\b(or|and|not)\\b" 43 | }, 44 | { 45 | "name": "keyword.other", 46 | "match": "\\b(new)\\b" 47 | }, 48 | { 49 | "name": "constant.language", 50 | "match": "\\b(true|false|null)\\b" 51 | }, 52 | { 53 | "name": "support.variable", 54 | "match": "\\b(self|locals|outer|globals|params|super)\\b" 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | 'use strict'; 4 | 5 | const path = require('path'); 6 | const webpack = require('webpack'); 7 | 8 | /**@type {import('webpack').Configuration}*/ 9 | const config = { 10 | target: 'webworker', // vscode extensions run in webworker context for VS Code web 📖 -> https://webpack.js.org/configuration/target/#target 11 | 12 | entry: './extension.js', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ 13 | output: { 14 | // the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/ 15 | path: path.resolve(__dirname, 'dist'), 16 | filename: 'extension.js', 17 | libraryTarget: 'commonjs2', 18 | devtoolModuleFilenameTemplate: '../[resource-path]' 19 | }, 20 | devtool: 'source-map', 21 | externals: { 22 | vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ 23 | }, 24 | resolve: { 25 | // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader 26 | mainFields: ['browser', 'module', 'main'], // look for `browser` entry point in imported node modules 27 | extensions: ['.ts', '.js'], 28 | alias: { 29 | // provides alternate implementation for node module and source files 30 | }, 31 | fallback: { 32 | // Webpack 5 no longer polyfills Node.js core modules automatically. 33 | // see https://webpack.js.org/configuration/resolve/#resolvefallback 34 | // for the list of Node.js core module polyfills. 35 | } 36 | }, 37 | module: { 38 | rules: [ 39 | { 40 | test: /\.ts$/, 41 | exclude: /node_modules/, 42 | use: [ 43 | { 44 | loader: 'ts-loader' 45 | } 46 | ] 47 | } 48 | ] 49 | } 50 | }; 51 | module.exports = config; 52 | --------------------------------------------------------------------------------