A powerful SDK for building and extending Scroll with Particles and Parsers.
- Parser Designer - Web IDE for writing Parsers
- Particles Sandbox - Interactive environment for exploring Particles
This repository contains the code for Particle Syntax and the Parsers Programming Language. These are the core layers upon which Scroll is built.
This repo is for advanced Scroll developers.
You can try the Parsers tutorial.
The ScrollSDK contains two implementations of Parsers: one in TypeScript and one in Parsers.
You write Parsers to extend Scroll. By creating Parsers with the SDK you get:
- A parser
- A type checker
- Syntax highlighting
- Autocomplete
- A compiler
- A virtual machine for executing your version of Scroll
The ScrollSDK also includes a simple web IDE for writing Parsers called Parser Designer.
At this point in time, to make your Parsers do very useful things, you also need to use another language that you know. The ScrollSDK lets you create new languages using just Scroll or Scroll + Javascript. Parsers can include code from any programming language, not just Javascript. Though at the moment only Scroll + Javascript is supported.
const {Particle} = require("scrollsdk/products/Particle.js")
const particle = new Particle("hello world")
console.log(particle.asString)
npm install .
npm run local
open http://localhost:3333/
npm install .
npm run local
open http://localhost:3333/designer
npm run build
npm test
The ScrollSDK is a monorepo. With on average over 1 major version released each month for the past 2.5 years, it would take a lot of overhead to constantly be updating 10+ different repositories and modules every month. Once we're more confident in the theory and best practices, it might make sense to break this repo into independent modules.
That being said, we despise unnecessary dependencies as much as anyone. If anyone wants to create some automated submodules built from the projects in this monorepo, to allow for consuming of a smaller subset of the code and dependencies in this module, feel free to do so.
All breaking changes are mentioned in the release notes. We follow semantic versioning, so breaking changes should not happen if you stay on the same major version.
If you build a Particles library/SDK in another language, let us know and we'll add a link.
If you are working on a Particles library in a new host language, feel free to post an issue or ask for help in the WWS subreddit.
npm run updateVersion NEW_NUMBER
Particles was originally called Tree Notation. Parsers was originally called Grammar.
It is helpful to set "goto_anything_exclude_gitignore": true
to ignore files in gitignore. Read more here.
This is the first Particles and Parsers libraries in existence, so there were no alternative implementations. Note and Space were predecessors to Particles. If a better alternative low level syntax to Particles is possible, it has yet to be discovered.
All that said, the important part of this repo is not the code but the design patterns. Particles is very simple, and you can implement the patterns contained here in your own code without using this library. In fact, that is often the best way to use Particles!
ScrollSDK is published to the Public Domain.