diff options
author | Ben Burwell <ben.burwell@trifecta.com> | 2016-09-14 12:39:47 -0400 |
---|---|---|
committer | Ben Burwell <ben.burwell@trifecta.com> | 2016-09-14 12:39:47 -0400 |
commit | d612d6c38a80d1e3a60a7a50be451a04a9587252 (patch) | |
tree | 53f3873d17c57a76b0bcc53d1f7419203a5c57e4 | |
parent | fd5817a6bb3185314540825e3d665e94ffe188c0 (diff) |
Add README
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..83ef96b --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# DOM language + +This is a little experiment around using the DOM to represent an [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) that can be evaluated in the browser with JavaScript. One neat side effect of this is the ability to use CSS to render a meaningful visual representation of the program being executed. + +Clearly, this is not a performant way to do things, but it is fun :) + +After cloning the repository, open up any of the `.doml` files found in the `prog` directory in your browser -- you should see it represented visually, and you'll see any output logged to the console. + +## About the language + +At this point, it is extremely simple and undocumented. All statements are executed in a global context, and are implemented in `./lib/statements.js`. Binary operators are implemented in `./lib/binops.js`. A rudimentary type system currently consisting of `string`, `number`, and `boolean` are mapped to native JavaScript types for evaluation. + |