├── CHANGELOG.md ├── README.md ├── language-configuration.json ├── package.json ├── snippets └── snippets.json ├── syntaxes └── qbasic.tmLanguage.json ├── temp.txt └── vsc-extension-quickstart.md /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the "bas" extension will be documented in this file. 3 | 4 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 5 | 6 | ## [Unreleased] 7 | - Initial release -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ***This is the generated README from yo, it's kind of meaningless to GITHUB....*** 2 | 3 | # bas README 4 | 5 | This is the README for your extension "bas". After writing up a brief description, we recommend including the following sections. 6 | 7 | incomplete syntax from https://raw.githubusercontent.com/nemoDreamer/sublime-syntax-qbasic/master/QBasic.tmLanguage 8 | https://github.com/Microsoft/vscode-go/blob/master/package.json for example JSON 9 | ## Features 10 | 11 | Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. 12 | 13 | For example if there is an image subfolder under your extension project workspace: 14 | 15 | \!\[feature X\]\(images/feature-x.png\) 16 | 17 | > Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. 18 | 19 | ## Requirements 20 | 21 | If you have any requirements or dependencies, add a section describing those and how to install and configure them. 22 | 23 | ## Extension Settings 24 | 25 | Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. 26 | 27 | For example: 28 | 29 | This extension contributes the following settings: 30 | 31 | * `myExtension.enable`: enable/disable this extension 32 | * `myExtension.thing`: set to `blah` to do something 33 | 34 | ## Known Issues 35 | 36 | Calling out known issues can help limit users opening duplicate issues against your extension. 37 | 38 | ## Release Notes 39 | 40 | Users appreciate release notes as you update your extension. 41 | 42 | ### 1.0.0 43 | 44 | Initial release of ... 45 | 46 | ### 1.0.1 47 | 48 | Fixed issue #. 49 | 50 | ### 1.1.0 51 | 52 | Added features X, Y, and Z. 53 | 54 | ----------------------------------------------------------------------------------------------------------- 55 | 56 | ## Working with Markdown 57 | 58 | **Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: 59 | 60 | * Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) 61 | * Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) 62 | * Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets 63 | 64 | ### For more information 65 | 66 | * [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) 67 | * [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) 68 | 69 | **Enjoy!** 70 | -------------------------------------------------------------------------------- /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": "'" //, "REM" 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | // "blockComment": [ "", "" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qb64", 3 | "displayName": "QB64", 4 | "description": "QB64 - QBasic language support & compiler", 5 | "version": "0.0.1", 6 | "author": { 7 | "name": "QB64 Community" 8 | }, 9 | "engines": { 10 | "vscode": "^1.30.0" 11 | }, 12 | "categories": [ 13 | "Programming Languages", 14 | "Snippets", 15 | "Linters", 16 | "Debuggers", 17 | "Formatters" 18 | ], 19 | "scripts": {}, 20 | "dependencies": { 21 | "diff": "^3.5.0", 22 | "json-rpc2": "^1.0.2", 23 | "vscode-debugadapter": "^1.32.1", 24 | "vscode-debugprotocol": "^1.32.0", 25 | "vscode-extension-telemetry": "^0.1.0", 26 | "vscode-languageclient": "~5.2.1" 27 | }, 28 | "devDependencies": { 29 | "vscode": "^1.1.26" 30 | }, 31 | "contributes": { 32 | "languages": [ 33 | { 34 | "id": "qbasic", 35 | "aliases": [ 36 | "QB64", 37 | "qbasic", 38 | "basic" 39 | ], 40 | "extensions": [ 41 | ".bas", 42 | ".qb", 43 | ".qbasic" 44 | ], 45 | "configuration": "./language-configuration.json" 46 | } 47 | ], 48 | "grammars": [ 49 | { 50 | "language": "qbasic", 51 | "scopeName": "source.qbasic", 52 | "path": "./syntaxes/qbasic.tmLanguage.json" 53 | } 54 | ], 55 | "snippets": [ 56 | { 57 | "language": "qbasic", 58 | "path": "./snippets/snippets.json" 59 | } 60 | ], 61 | "configurationDefaults": { 62 | "[go]": { 63 | "editor.insertSpaces": false, 64 | "editor.formatOnSave": true 65 | } 66 | } 67 | }, 68 | "debuggers": [ 69 | { 70 | "type": "qb64", 71 | "label": "qb64", 72 | "enableBreakpointsFor": { 73 | "languageIds": [ 74 | "qb64", 75 | "qb", 76 | "qbasic" 77 | ] 78 | } 79 | } 80 | ] 81 | } -------------------------------------------------------------------------------- /snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Print to console": { 3 | "prefix": "PRINT", 4 | "body": [ 5 | "PRINT \"$1\"" 6 | ], 7 | "description": "Log output to console" 8 | } 9 | } -------------------------------------------------------------------------------- /syntaxes/qbasic.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "scopeName": "source.qbasic", 3 | "uuid": "e7de52b7-8378-4396-848e-e9da04e24ddb", 4 | "fileTypes": [ 5 | "bas", 6 | "qb", 7 | "qbasic" 8 | ], 9 | "name": "QBasic", 10 | "patterns": [ 11 | { 12 | "captures": { 13 | "1": { 14 | "name": "punctuation.definition.comment.qbasic" 15 | } 16 | }, 17 | "comment": "Comment", 18 | "match": "(').*", 19 | "name": "comment.line.qbasic" 20 | }, 21 | { 22 | "comment": "Delimiter", 23 | "match": "[,:;]", 24 | "name": "meta.delimiter.object.qbasic" 25 | }, 26 | { 27 | "comment": "Keyword", 28 | "match": "(?i)(\\b((END )?IF|(END )?SELECT|(RESUME )?NEXT|CASE|CLOSE|DO|ELSE|FOR|GOSUB|GOTO|LOOP|ON|OPEN|RETURN|THEN|TO|UNTIL|WHILE)\\b)", 29 | "name": "keyword.control.qbasic" 30 | }, 31 | { 32 | "comment": "Function", 33 | "match": "(?i)(\\b(CHR$|CLS|COLOR|DATA|INPUT|INT|KEY|LEN|LINE|LOCATE|PALETTE|PLAY|PRINT|PSET|PUT|REDIM|RND|SCREEN|TAB|VIEW)\\b)", 34 | "name": "support.function.qbasic" 35 | }, 36 | { 37 | "comment": "Operator", 38 | "match": "(?i)((\\+|=|<|>| <>|AND|OR))", 39 | "name": "keyword.operator.qbasic" 40 | }, 41 | { 42 | "comment": "Numeric", 43 | "match": "\\b(\\d(\\.\\d)?)+", 44 | "name": "constant.numeric.qbasic" 45 | }, 46 | { 47 | "comment": "Global", 48 | "match": "\\b\\w+\\$", 49 | "name": "constant.global.qbasic" 50 | }, 51 | { 52 | "captures": { 53 | "1": { 54 | "name": "entity.name.function.qbasic" 55 | } 56 | }, 57 | "comment": "SUB", 58 | "match": "(?i)(^(\\w+):)", 59 | "name": "meta.function.qbasic" 60 | }, 61 | { 62 | "comment": "Brace, round", 63 | "match": "[\\(\\)]", 64 | "name": "meta.brace.round.qbasic" 65 | }, 66 | { 67 | "comment": "Brace, curly", 68 | "match": "[\\{\\}]", 69 | "name": "meta.brace.curly.qbasic" 70 | }, 71 | { 72 | "begin": "(\\w+\\()", 73 | "beginCaptures": { 74 | "1": { 75 | "name": "constant.array.qbasic" 76 | } 77 | }, 78 | "comment": "Array", 79 | "end": "(\\))", 80 | "endCaptures": { 81 | "1": { 82 | "name": "constant.array.qbasic" 83 | } 84 | }, 85 | "name": "other.array.qbasic", 86 | "patterns": [ 87 | { 88 | "include": "$self" 89 | } 90 | ] 91 | }, 92 | { 93 | "begin": "(\")", 94 | "beginCaptures": { 95 | "1": { 96 | "name": "punctuation.definition.string.begin.qbasic" 97 | } 98 | }, 99 | "comment": "String, double-quoted", 100 | "end": "(\")", 101 | "endCaptures": { 102 | "1": { 103 | "name": "punctuation.definition.string.begin.qbasic" 104 | } 105 | }, 106 | "name": "string.quoted.double.qbasic", 107 | "patterns": [ 108 | { 109 | "comment": "Escaped double-quote inside double-quoted string", 110 | "match": "(\\\")", 111 | "name": "constant.character.escape.qbasic" 112 | }, 113 | { 114 | "comment": "Single quote inside double-quoted string", 115 | "match": "(')", 116 | "name": "other.qbasic" 117 | }, 118 | { 119 | "include": "$self" 120 | } 121 | ] 122 | } 123 | ] 124 | } -------------------------------------------------------------------------------- /temp.txt: -------------------------------------------------------------------------------- 1 | //, 2 | // { 3 | // "comment": "Operator", 4 | // "match": 5 | // "(\+|=|<|>| <>|AND|OR)", 6 | // "name": "keyword.operator.qbasic" 7 | // }, 8 | // 9 | // { 10 | // "comment": "Numeric", 11 | // "match": 12 | // "\b(\d(\.\d)?)+", 13 | // "name": "constant.numeric.qbasic" 14 | // }, 15 | // { 16 | // "comment": "Global", 17 | // "match": 18 | // "\b\w+\$", 19 | // "name": "constant.global.qbasic" 20 | // }, 21 | // { 22 | // "captures": { 23 | // "1": { 24 | // "name": "entity.name.function.qbasic" 25 | // } 26 | // }, 27 | // "comment": "SUB", 28 | // "match": 29 | // "^(\w+):", 30 | // "name": "meta.function.qbasic" 31 | // }, 32 | // { 33 | // "comment": "Brace, round", 34 | // "match": 35 | // "[\(\)]", 36 | // "name": "meta.brace.round.qbasic" 37 | // }, 38 | // { 39 | // "comment": "Brace, curly", 40 | // "match": 41 | // "[\{\}]", 42 | // "name": "meta.brace.curly.qbasic" 43 | // }, 44 | // { 45 | // "begin": 46 | // "(\w+\()", 47 | // "beginCaptures": { 48 | // "1": { 49 | // "name": "constant.array.qbasic" 50 | // } 51 | // }, 52 | // "comment": "Array", 53 | // "end": 54 | // "(\))", 55 | // "endCaptures": { 56 | // "1": { 57 | // "name": "constant.array.qbasic" 58 | // } 59 | // }, 60 | // "name": "other.array.qbasic", 61 | // "patterns": [ 62 | // { 63 | // "include": "$self", 64 | // } 65 | // ] 66 | // }, 67 | // { 68 | // "begin": "(")", 69 | // "beginCaptures": { 70 | // "1": { 71 | // "name": "punctuation.definition.string.begin.qbasic" 72 | // } 73 | // }, 74 | // "comment": "String, double-quoted", 75 | // "end": "(")", 76 | // "endCaptures": { 77 | // "1": { 78 | // "name": "punctuation.definition.string.begin.qbasic" 79 | // } 80 | // }, 81 | // "name": "string.quoted.double.qbasic", 82 | // "patterns": [ 83 | // { 84 | // "comment": "Escaped double-quote inside double-quoted string", 85 | // "match": "(\\")", 86 | // "name": "constant.character.escape.qbasic" 87 | // }, 88 | // { 89 | // "comment": "Single quote inside double-quoted string", 90 | // "match": "(')", 91 | // "name": "other.qbasic" 92 | // }, 93 | // { 94 | // "include": "$self" 95 | // } 96 | // ] 97 | // } -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | * This folder contains all of the files necessary for your extension. 5 | * `package.json` - this is the manifest file in which you declare your language support and define 6 | the location of the grammar file that has been copied into your extension. 7 | * `syntaxes/qbasic.tmLanguage` - this is the Text mate grammar file that is used for tokenization. 8 | * `language-configuration.json` - this is the language configuration, defining the tokens that are used for 9 | comments and brackets. 10 | 11 | ## Get up and running straight away 12 | * Make sure the language configuration settings in `language-configuration.json` are accurate. 13 | * Press `F5` to open a new window with your extension loaded. 14 | * Create a new file with a file name suffix matching your language. 15 | * Verify that syntax highlighting works and that the language configuration settings are working. 16 | 17 | ## Make changes 18 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 19 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 20 | 21 | ## Add more language features 22 | * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at 23 | https://code.visualstudio.com/docs 24 | 25 | ## Install your extension 26 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 27 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 28 | --------------------------------------------------------------------------------