[go: up one dir, main page]

Skip to content
/ golox Public

A VM-based interpreter for the Lox Programming Language.

Notifications You must be signed in to change notification settings

rami3l/golox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages