TODO: come up with a name for the language
A compiled programming language that targets Scratch.
To learn the language, see the language reference. For a high-level overview of the compiler, see the architecture.
Scratch is a project of the Scratch Foundation, in collaboration with the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
# Only check
scratch-compiler-2 check main.sc2
# Compile to a Scratch project
scratch-compiler-2 compile main.sc2
Copy/symlink the Tree-sitter queries to queries/sc2
in the Helix runtime
directory and add the following to languages.toml
:
[[language]]
name = "sc2"
scope = "source.sc2"
injection-regex = "sc2"
roots = [".git"]
file-types = ["sc2"]
comment-token = "#"
indent = { tab-width = 4, unit = " " }
formatter = { command = "/path/to/compiled-executable", args = ["format"] }
auto-format = true
[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
[[grammar]]
name = "sc2"
source = { path = "/path/to/repo/tree-sitter-sc2" }