Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 555 Bytes

README.md

File metadata and controls

24 lines (21 loc) · 555 Bytes

Lox bytecode virtual machine interpreter written in Go. Based on https://www.craftinginterpreters.com

Features

  • Data Types: Boolean, Number, String, Nil
  • Expressions: Arithmetic, Comparison and equality, Logical operators, Precedence and grouping
  • Statements
  • Variables: Global, Local
  • Control Flow: If else, While, For
  • Function: Closure
  • Class: Instantiation, Inheritance

Compile

go build

Run

golox <path-to-file>

Run from source

go run main.go <path-to-file>