๐บ 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.