https://github.com/tact-lang/prism-ton
🔺 Maintained set of TON programming language definitions/grammars for Prism.js
https://github.com/tact-lang/prism-ton
blockchain fift func grammar grammars prism-js prismjs tact the-open-network tl-b ton
Last synced: 29 days ago
JSON representation
🔺 Maintained set of TON programming language definitions/grammars for Prism.js
- Host: GitHub
- URL: https://github.com/tact-lang/prism-ton
- Owner: tact-lang
- License: mit
- Created: 2024-03-18T06:33:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T03:46:23.000Z (3 months ago)
- Last Synced: 2025-03-29T23:41:10.562Z (about 2 months ago)
- Topics: blockchain, fift, func, grammar, grammars, prism-js, prismjs, tact, the-open-network, tl-b, ton
- Language: JavaScript
- Homepage: https://docs.ton.org
- Size: 56.6 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prism-ton
🔺 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## Initialization
Upon cloning this repo, invoke the following commands in order of appearance (but just once!):
1. `yarn prism:init` — initializes the prismjs/prism submodule and installes it's dependencies
2. `yarn prism:links` — creates all the necessary symbolic links from local files to the prismjs/prism submodule
3. `yarn prism:build` — builds all the grammars and everything there is in prismjs/prism## Layout
Grammar files are located in `langs/X` files, where `X` can be one of:
* `prism-tact.js` — Tact grammar
* `prism-func.js` — FunC grammar
* `prism-fift.js` — Fift grammar
* `prism-tlb.js` — TL-B grammarTest files are located in `tests/X` folders, where `X` can be one of:
* `tact` — Tact tests
* `func` — FunC tests
* `fift` — Fift tests
* `tlb` — TL-B tests## Running tests
[Once initialized](#initialization), you'll be able to run tests for each language in this repo, namely:
* `yarn test:tact` will run tests for Tact
* `yarn test:func` will run tests for FunC
* `yarn test:fift` will run tests for Fift
* `yarn test:tlb` will run tests for TL-BAnd `yarn test` runs all those tests in succession.
## Workflow
The workflow looks like this:
1. Add changes to the grammar
2. See how it works by opening the `.github/submodule-prism/test.html` file in the browser
3. Add/update tests
4. Execute and modify tests until they pass :)
5. Commit & push
6. Make PRs to:
* ton-community/ton-docs
* TelegramMessenger/libprisma
* prismjs/prismPrism.js docs: https://prismjs.com/extending.html
Awesome RegExp visualization tool: https://regex101.com## TODO
* [ ] Github Actions checks akin to ones in prismjs/prism
* [ ] Pre-push hooks with mandatory builds & tests -> push shall be stopped in case of errors## Credits
Based on [The Open Network](https://ton.org).
Made & maintained with 🤍 by [Novus Nota](https://github.com/novusnota).
## License
[MIT](LICENSE)