Skip to content

A new programming language built on TypeScript ✨

License

Notifications You must be signed in to change notification settings

gscript-lang/gscript

Repository files navigation

gScript

A new programming language built on TypeScript ✨

Note: This is the interpreter/"compiler" lib, the CLI tool is used in the given examples.

IN EARLY DEVELOPMENT STAGES

Install

Prerequisites:

  • Node JS
  • NPM

Using NPM

npm install gscript-cli -g

Using Yarn

yarn global add gscript-cli

Running A File

gs run ./path/to/file.gs
or

gscript run ./path/to/file.gs

Syntax

At the moment, there are only two keywords, def, and log.
def defines a variable and it's corresponding value.
log logs something in the console
// at the start of a line means that it is a comment.

Examples:

def HW = "Hello World"
log HW
// returns Hello World

def MyArr = ["MyArray"]
log MyArr
// returns ["MyArray"]

// log a string
log "This is a string"
// returns This is a string

// split a string and log it.
log "This is a string".split(" ")
// returns ["This", "is", "a", "string"]

About

A new programming language built on TypeScript ✨

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •