jBC for Visual Studio Code
Syntax highlighting for jBC programs (.b) and T24 TESTCASE sources (.tut). The extension uses the active VS Code theme and works without the compiler. It also supports line-comment toggling and bracket matching.
jBC documentation · GitHub organization · Online jBC playground
Open this folder in VS Code and press F5 to launch the Extension Development Host. Open a .b or .tut file there and run Developer: Inspect Editor Tokens and Scopes to inspect the grammar.
Use Change Language Mode to select jBC for an extensionless source. To remember the choice for include files or override .b in a mixed-language project, set files.associations in that workspace. For example, "I_*": "jbc" associates files matching that include naming convention.
Development
npm ci
npm test
The tests load the grammar using TextMate and Oniguruma and assert scopes for comments, strings, labels, built-in calls, and incomplete lines.
Highlighting uses lexical context. Ambiguous spellings, such as a variable named PRINT in an expression, can still receive a keyword scope. The grammar uses the reference keyword spellings and recognizes preprocessor directives case-insensitively.
Release
Set the next version in package.json and package-lock.json, then push it to main. Run gh workflow run publish.yml --ref main to test and package the extension. To publish that version to the Marketplace, run gh workflow run publish.yml --ref main -f publish=true.
The workflow uses Marketplace Trusted Publishing. Under the alexander-demin publisher, authorize repository owner jbc-lang, repository jbc-vscode, and workflow publish.yml. Leave the environment field empty.