Raptor Lang
An experimental, interpreted programming language implemented in JavaScript.
Originally made for use in the Velociraptor Escape part of the HackMIT 2016 puzzle.
Usage
Raptor is on npm. Use it as follows:
// 'std' indicates which built-in library to usevar raptor = 'std'; // required Raptor source codevar program = `logYear { foo = 200 log -> 10*foo + 16}logYearreturn 1618`; // optional limits on the code complexity / compute timevar limits = code: 100 compute: 1000; // optional way to accumulate execution statisticsvar stats = {}; // side effects:// * console.log's 2016// * stats = {astSize: 18, statement: 5, time: 2, ...}// * result = 1618var result = raptor;
Syntax
[WIP]
License
MIT License: http://igliu.mit-license.org/