An unassuming language with a way to create code in macros using hygienic string interpolation.
$ git clone git@github.com:masak/mozzarella-programming-language.git
$ cd mozzarella-programming-language
$ npm install
$ npm test
A rewrite of the evaluator that takes up less code, and makes the code less tangled.
work
---------- [here]
work work |
---------- ---------- |
planning finishing up
---------- ----------
-------------------------------------------------------
work
[here] ----------
| work work
| ---------- ----------
planning finishing up
---------- ----------
-------------------------------------------------------
The desired rule is: a statement can be properly terminated either by a
semicolon (;), or by (a) the statement itself ending with a closing curly
(}), and (b) the statement being followed by whitespace with a newline in it.
This has two parts. One, that the error messages should be humane and help the human with possible next steps. Two, that the error messages, whenever possible, should be connected to source location information, and show the source at which the error occurred.
There's a spec/ directory with individual specification files describing each incremental feature in fairly-precise human-targeted prose. The specification text in those files is not meant to be completely formal, but enough for a human implementor to be able to correctly guess the intended implementation.
- integers
- strings
- booleans
- none
- integer operators
- string operators
- boolean operators
- comparison operators
- parentheses
- expression statements
- empty statements
- statement lists
- block statements
-
doexpressions -
ifstatements - arrays
- indexing
- variable declarations
- variable reference
-
forstatements - assignments
-
whilestatements -
laststatements -
nextstatements - functions
- calls
- parameters
-
returnstatements - macros
- quote expressions
- quote interpolation
- macro hygiene