🔺 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:tact
will run tests for Tactyarn test:func
will run tests for FunCyarn test:fift
will run tests for Fiftyarn test:tlb
will 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.html
file 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.