A very small language project to help me to learn more about Abstract Syntax Tree.
This compiler is WIP.
A example of this language specification can be found here.
List of commands supported and planning to implement:
-
show
: Just prints a message in yourstdout
-
#
: Add a comment to your code -
def
: Add a variable
var Ping = require('ping')
var code = 'show "just a message" # Just a comment';
console.log(Ping.compile(code));
<script src="path/to/ping.js"></script>
var code = 'show "just a message"';
var result = Ping.compile(code);
document.body.innerHTML = result;
Type npm run build
in your tty and be happy. :D
Type npm run sample
in your tty and see dist/result/result.js
file.