Skip to content

turbomaze/raptor-lang

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
src
 
 
 
 
 
 
 
 

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 use
var raptor = require('raptor-lang')('std');

// required Raptor source code
var program = `
logYear {
  foo = 200
  log -> 10*foo + 16
}
logYear
return 1618
`;

// optional limits on the code complexity / compute time
var limits = {code: 100, compute: 1000};

// optional way to accumulate execution statistics
var stats = {};

// side effects:
// * console.log's 2016
// * stats = {astSize: 18, statement: 5, time: 2, ...}
// * result = 1618
var result = raptor.interpret(program, limits, stats);

Syntax

[WIP]

License

MIT License: http://igliu.mit-license.org/

About

An experimental functional language implemented in javascript.

Resources

Stars

Watchers

Forks

Packages

No packages published