This extension provides support for B2 build system in Visual Studio Code.
The main, and currently only, feature of this extension is coloring of the
Boost.Jam language. Which is an extension of the Perforce Jam language.
Boost.Jam is an interpreted language implemented by
B2 engine, b2, which loads the Jam code that
implements the build system.
- Syntax highlighting
- Code comments
Although the process of writing a TextMate language grammar remains poorly documented, this is a brave first attempt to provide a minimal usable support for Boost.Jam. By no means, it is free from bugs or covers all elements of Boost.Jam language. Non-trivial TextMate grammars for Visual Studio Code count from 500 to 5000 lines of code, and this one less than 200.
- Visual Studio Code > Extensions (CTRL+SHIFT+X)
- https://marketplace.visualstudio.com/items?itemName=bfgroup.b2-vscode
- Mateusz Łoskot for the initial work this extension is based on.
The main part of the extension is the bjam.tmLanguage.json file.
This file contains language grammar for Boost.Jam
syntax highlighting. The file was written from scratch and not converted from
any existing TextMate grammar.
If you want to offer a fix or improvement, awesome!
Please improve the file and create a pull request against this git repository.
All contributions are welcome!
There are no automated tests provided.
There is just test/colorize-fixtures/test.jam file provided,
but without company of test/colorize-results/test_jam.json file.
In fact, I have no idea how such tests should be implemented.
Instead, install or run the extension and open test/colorize-fixtures/test.jam
file. Look what you see and compare it with what you would prefer to see.
Then, hopefully, happy hacking in attempt to correct the language grammar :-)
Running and debugging your extension explains in details how to run the extension for convenient development and testing. In short:
- Open
b2-vscodefolder in VSCode and hit F5 to start debugging. - New (preview) window appears with the extension loaded, in it, open the
test.jamor your own Jamfile. - Edit the grammar file in the parent window.
- Reload the debugging (preview) window with CTRL+R
- Observe result, modify the
test.jam. - Iterate over steps from 3 to 5
(by original author)
Follow the official guide on [Publishing Extension(https://code.visualstudio.com/api/working-with-extensions/publishing-extension) to VS Code Extension Marketplace.
Enjoy!
