πΊ 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.