Skip to content

Latest commit

ย 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Caution

Tact grammar is deprecated; others are deemed legacy. Prefer TextMate grammars over Prism.js ones.

For up-to-date TextMate grammars, see the TON language server repository.

prism-ton

๐Ÿ”บ Set of TON blockchain programming language definitions for Prism.js:

โ–ผ Deprecated:

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-func.js โ€” FunC grammar
  • prism-fift.js โ€” Fift grammar
  • prism-tlb.js โ€” TL-B grammar
  • prism-tact.js โ€” Tact grammar (deprecated)

Test files are located in tests/X folders, where X can be one of:

  • func โ€” FunC tests
  • fift โ€” Fift tests
  • tlb โ€” TL-B tests
  • tact โ€” Tact tests (deprecated)

Running tests

Once initialized, you'll be able to run tests for each language in this repo, namely:

  • yarn test:func will run tests for FunC
  • yarn test:fift will run tests for Fift
  • yarn test:tlb will run tests for TL-B
  • yarn test:tact will run tests for Tact (deprecated)

And yarn test runs all those tests in succession.

Workflow

The workflow looks like this:

  1. Add changes to the grammar
  2. Revise them by opening the .github/submodule-prism/test.html file in the browser
  3. Add or update tests
  4. Repeatedly execute and adjust tests until they pass
  5. Commit & push
  6. Make PRs to:

Credits

Based on The Open Network.

Made & maintained with ๐Ÿค by Novus Nota.

License

MIT

About

๐Ÿ”บ Maintained set of TON programming language definitions/grammars for Prism.js

Topics

Resources

Stars

3 stars

Watchers

4 watching

Forks

Used by

Contributors

Languages