๐บ Maintained set of TON blockchain programming language definitions for Prism.js
- โก Tact โ https://tact-lang.org
- ๐ FunC โ https://docs.ton.org/develop/func/overview
- ๐ Fift โ https://docs.ton.org/develop/fift/overview
- ๐ TL-B โ https://docs.ton.org/develop/data-formats/tl-b-language
Upon cloning this repo, invoke the following commands in order of appearance (but just once!):
yarn prism:initโ initializes the prismjs/prism submodule and installes it's dependenciesyarn prism:linksโ creates all the necessary symbolic links from local files to the prismjs/prism submoduleyarn prism:buildโ builds all the grammars and everything there is in prismjs/prism
Grammar files are located in langs/X files, where X can be one of:
prism-tact.jsโ Tact grammarprism-func.jsโ FunC grammarprism-fift.jsโ Fift grammarprism-tlb.jsโ TL-B grammar
Test files are located in tests/X folders, where X can be one of:
tactโ Tact testsfuncโ FunC testsfiftโ Fift teststlbโ TL-B tests
Once initialized, you'll be able to run tests for each language in this repo, namely:
yarn test:tactwill run tests for Tactyarn test:funcwill run tests for FunCyarn test:fiftwill run tests for Fiftyarn test:tlbwill run tests for TL-B
And yarn test runs all those tests in succession.
The workflow looks like this:
- Add changes to the grammar
- See how it works by opening the
.github/submodule-prism/test.htmlfile in the browser - Add/update tests
- Execute and modify tests until they pass :)
- Commit & push
- Make PRs to:
- ton-community/ton-docs
- TelegramMessenger/libprisma
- prismjs/prism
Prism.js docs: https://prismjs.com/extending.html Awesome RegExp visualization tool: https://regex101.com
- Github Actions checks akin to ones in prismjs/prism
- Pre-push hooks with mandatory builds & tests -> push shall be stopped in case of errors
Based on The Open Network.
Made & maintained with ๐ค by Novus Nota.