Skip to content

jhm-ciberman/interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interpreter

A test interpreter, made for learning purposes

Try the interpreter for yourself

git clone https://github.com/jhm-ciberman/interpreter
cd interpreter
npm install
npm link

Then navigate to any directory and create a new file:

// main.ciber
/*
Program that calculates factorial of N 
*/

var product = 1;
var j = 1;
var N = 10;

while ( j <= N ) { // iterative
  product = product * j;
  j = j + 1;
}

product;

And run it with:

ciber main.ciber

The output will be the factorial of 10:

3628800

About

A test interpreter, made for learning purposes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published