/LoxSharp

C# implementation of the lox interpreter described in Crafting interpreters by Robert Nystrom

Primary LanguageC#

LoxSharp

C# implementation of the lox interpreter described in Crafting interpreters by Robert Nystrom — © 2015 – 2017

Customizations to the language

Lambda expressions

fun(x) -> x + 1;

Expression if

x if x > 0 else -1;

To do

Chapter 2:

  • Scanning
  • Representing Code
  • Parsing Expressions
  • Evaluating Expressions
  • Statements and State
  • Control Flow
  • Functions
  • Resolving and Binding
  • Classes
  • Inheritance

Chapter 3:

  • Chunks of Bytecode
  • A Virtual Machine
  • Scanning on Demand
  • Compiling Expressions
  • Types of Values
  • Strings
  • Hash Tables
  • Global Variables
  • Local Variables
  • Jumping Back and Forth
  • Calls and Functions
  • Closures
  • Garbage Collection
  • Classes and Instances
  • Methods and Initializers
  • Superclasses
  • Optimization