/gscript

A new programming language built on JavaScript ✨

Primary LanguageJavaScriptMIT LicenseMIT

gScript

A new programming language built on JavaScript ✨

Install

npm install gscript-compiler -g

Compiling a file

gs ./path/to/file.gs
or

gscript ./path/to/file.gs

Syntax

At the moment, there are only two keywords, def, and print.
def defines a variable and it's corresponding value.
print prints something in the console
// at the start of a line means that it is a comment.
All keywords must be suffixed with :.

Examples:

def: HW = "Hello World"
print: HW 
// returns Hello World

def: MyArr = ["MyArray"]
print: MyArr
// returns ["MyArray"]

// print a string
print: "This is a string"
// returns This is a string