Skip to content

afishr/rainbow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌈 Rainbow

Rainbow Programming Language

WIP

Currently only lexer and parser are implemented. In the near future here can appear the intepreter 👀

Syntax example

var fib = fn(x) {
  if (!x)
    return 0;

  if (x < 3)
    return 1;

  return fib(x-1) + fib(x-2);
}

var result = fib(10);
print("The 10th number in Fibonacci sequence is " + result);

REPL

You can play with rainbow by runing $ go run main.go and see how your entered statements are parsed in real time

Credits

Thorsten Ball - Writing An Interpreter In Go

Pratt Parsers: Expression Parsing Made Easy

  _ __ __ _(_)_ __ | |__   _____      __
 | '__/ _` | | '_ \| '_ \ / _ \ \ /\ / /
 | | | (_| | | | | | |_) | (_) \ V  V / 
 |_|  \__,_|_|_| |_|_.__/ \___/ \_/\_/ 

About

Rainbow Programming Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages