pull/48/merge
ELI JOSEPH BRADLEY 8 years ago committed by GitHub
commit dea6779dbd

@ -0,0 +1,8 @@
{
"presets": [
"es2015",
],
"plugins": [
"transform-es2015-modules-commonjs"
]
}

3
.gitignore vendored

@ -0,0 +1,3 @@
node_modules
*.log
lib

@ -1,5 +1,4 @@
<a href="super-tiny-compiler.js"><img width="731" alt="THE SUPER TINY COMPILER" src="https://cloud.githubusercontent.com/assets/952783/14171276/ed7bf716-f6e6-11e5-96df-80a031c2769d.png"/></a>
[![](https://cloud.githubusercontent.com/assets/952783/14171276/ed7bf716-f6e6-11e5-96df-80a031c2769d.png)](src/super-tiny-compiler.js)
***Welcome to The Super Tiny Compiler!***
This is an ultra-simplified example of all the major pieces of a modern compiler
@ -8,7 +7,7 @@ written in easy to read JavaScript.
Reading through the guided code will help you learn about how *most* compilers
work from end to end.
### [Want to jump into the code? Click here](super-tiny-compiler.js)
### [Want to jump into the code? Click here](src/super-tiny-compiler.js)
---
@ -27,7 +26,7 @@ the nerds are able to understand.
### Okay so where do I begin?
Awesome! Head on over to the [super-tiny-compiler.js](super-tiny-compiler.js)
Awesome! Head on over to the [src/super-tiny-compiler.js](src/super-tiny-compiler.js)
file.
### I'm back, that didn't make sense
@ -39,7 +38,7 @@ watch/star this repo or follow me on
### Tests
Run with `node test.js`
Run with `npm test`
---

@ -0,0 +1,27 @@
{
"name": "the-super-tiny-compiler",
"version": "1.0.0",
"description": "Possibly the smallest compiler ever",
"main": "lib/super-tiny-compiler.js",
"scripts": {
"test": "npm run build && node test.js",
"build": "babel src -d lib",
"prepublish": "npm run build"
},
"repository": "thejameskyle/the-super-tiny-compiler",
"keywords": [
"compiler",
"tiny",
"example"
],
"author": "James Kyle <me@thejameskyle.com>",
"license": "CC-BY-4.0",
"bugs": {
"url": "https://github.com/thejameskyle/the-super-tiny-compiler/issues"
},
"homepage": "https://github.com/thejameskyle/the-super-tiny-compiler",
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-preset-es2015": "^6.16.0"
}
}

@ -1,4 +1,4 @@
var superTinyCompiler = require('./super-tiny-compiler');
var superTinyCompiler = require('./lib/super-tiny-compiler');
var assert = require('assert');
var tokenizer = superTinyCompiler.tokenizer;

Loading…
Cancel
Save