Skip to content

About

My own programming language

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

█████████████████████████████████████████████████████████████████████████████
█                                                                           █▒
█  ████   ████  █████  ██████  █████  ████  █████  ██████ █████  ██████     █▒░
█ ██  ██ ██  ██ ██  ██ ██     ██     ██  ██ ██  ██   ██   ██  ██   ██       █▒░
█ ██     ██  ██ ██  ██ ████    ████  ██     █████    ██   █████    ██       █▒░
█ ██  ██ ██  ██ ██  ██ ██         ██ ██  ██ ██  ██   ██   ██       ██       █▒░
█  ████   ████  █████  ██████ █████   ████  ██  ██ ██████ ██       ██   ██  █▒░
█                                                                           █▒░
█████████████████████████████████████████████████████████████████████████████▒░
 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░
  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Codescript

A programming language inspired by JavaScript, TypeScript, and Python. Written in TypeScript. Extension: .code

Installation

Download and run CodescriptInstaller.exe from the releases page.

Requires Node.js

Usage

codes              # opens the REPL
codes file.code    # runs a .code file
codes --help       # shows help
codes --version    # shows version

Syntax example

var name = "Isaque"

func greet(n:string)
{
    print("Hello, " + n)
}

class Person
{
    build(n:string, a:number)
    {
        me.name = n
        me.age = a
    }
    introduce()
    {
        print("Hi, I am " + me.name)
    }
}

greet(name)

var p = Person("Isaque", 14)
p.introduce()

Features

  • Variables, functions, classes
  • if/else, while, until, for, forever loops
  • me instead of this/self
  • build() instead of constructor()
  • ~ single line comments, ~[] multi-line comments
  • $import for modules
  • REPL and file runner
  • Supports compact and expanded brace styles

Building from source

npm install
npm run build
codes

License

MIT

Online Interpreter here

About

My own programming language

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages