rami3l / golox

A VM-based interpreter for the Lox Programming Language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

golox

The Lox Programming Language implemented in Go, based on the original clox implementation*.

* : For the tree-walking interpreter, see rami3l/dolores.


Contents


Features

  • Lexer
  • Pratt parser & bytecode compiler
  • Bytecode VM
  • Basic types
  • Floating point arithmetic
  • Logic expressions
  • Control flow
    • Jumps: break/continue**
  • Functions
  • Classes
  • Instances
  • Instance methods
    • this
    • Initializers
  • Inheritance
    • super

** : Extension

Try it out!

With the latest Go toolchain installed:

To refresh generated source files:

go generate ./...

To run:

go run main.go

To run with debug info:

go run -tags DEBUG main.go -v=debug

About

A VM-based interpreter for the Lox Programming Language.


Languages

Language:Go 100.0%