Skip to content

SandBox is a programming language made of JS & ANTLR4.

License

Notifications You must be signed in to change notification settings

redteadeveloper/SandBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SandBox

Easy to read. Easy to write.

Generic badge Library Codacy Badge

About

SandBox is a simple programming language made of JS & ANTLR4.

Our philosophy is: Programming languages must be easy to read & write.

Examples

  • 99 Bottles of Beer
let a = 1;

while a < 100 {
    if a == 99 {
        print("No more bottles of beer on the wall, no more bottles of beer.");
        print("Go to the store and buy some more, 99 bottles of beer on the wall.");
    } else if a == 98 {
        print("1 bottle of beer on the wall, 1 bottle of beer.");
        print("Take it down and pass it around, no more bottles of beer on the wall.");
        print("");
    } else {
        let b = 100 - a;
        print(b + " bottles of beer on the wall, " + b + " bottles of beer.");
        print("Take one down and pass it around, " + (b - 1) + " bottles of beer on the wall.");
        print("");
    }
    let a = a + 1;
}
  • FizzBuzz
let a = 1;

while a <= 100 {
    if a % 15 == 0 {
        print("FizzBuzz");
    } else if a % 5 == 0 {
        print("Buzz");
    } else if a % 3 == 0 {
        print("Fizz");
    } else {
        print(a);
    }
    let a = a + 1;
}

Building

Prerequisites

Build

  1. Clone this repository.

  2. Open cmd and move to SandBox folder.

  3. Run npm install command.

  4. Run npm install --save-dev pkg command.

  5. Run pkg . command.

Samples (0.1.4)

Known Issues

None.

If you find an issue, please report it here.

Documentation

Click here

Credits

SandBox is made by RedTea.

Works Cited