Miniscript is a compiler that translates its code to Javascript. It makes coding faster and easier by following the DRY principle. The miniscript code is smaller than the equivalent javascript and as fast as it.
Install:
$ npm install miniscript -g
Example:
fib = (num) {
if num is 0 || num is 1
return num
else
return fib(num-1) + fib(num-2)
end
}
print fib(5)
var fib;
fib = function(num) {
if (num == 0 || num == 1) {
return num;
} else {
return fib(num - 1) + fib(num - 2);
}
};
console.log(fib(5));
##Under development until v.1.0.0
- Correct error stack
- Produce sourcemaps
- More optimisations
- Better string interpolation
- Import improvements
- Fixed
Script.createContext()
bug to work on node v0.12 - Interactive miniscript now uses node's REPL instead of a custom implementation. REPL autocomplete feature is not supported (yet).
- More functionality
- Better syntax (almost finalized)
- Better Performance
- Bug fixes (nested loop statements and others)
- Miniscript web compiler
- No dependencies
- Grammar redesign
- Faster flex parsing
- Faster compiler
- Changes in language (syntax may change until v1.0.0)
- Less dependencies
set get on private members