Skip to content

(WIP) Elm implementation of the jlox interpreter from the book "Crafting Interpreters"

Notifications You must be signed in to change notification settings

Janiczek/elm-lox-1

Repository files navigation

elm-lox-1

A port of the jlox interpreter from "Crafting Interpreters".

Screenshot of it in action

TODO

  • Chapters 6.3.1..6.3.3, 8.2.2: Parser.onError, Parser.recover, Parser.synchronizeTo : Token -> ...? Result holding a list of errors instead of a single error? On error skip tokens until you see a specific one

  • Everywhere we return an error with line -1, thread some token in there to be able to get its line

  • check that we set global variable if not found in the local scope, and that it survives the deletion of the local Env

var x = 1;
{
  print x; // 1
  x = 2;
  print x; // 2

  var y = 1;
  print y; // 1
}
print x; // 2

About

(WIP) Elm implementation of the jlox interpreter from the book "Crafting Interpreters"

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages