dlox 0.0.1 copy "dlox: ^0.0.1" to clipboard
dlox: ^0.0.1 copied to clipboard

An implementation of the Lox language in Dart.

dlox #

An implementation of the Lox language in Dart.

Lox is a didactic language as proposed in the book Crafting Interpreters. In the first part of the book, the autor guides the reader in the process of making an interpreter for the Lox language in Java.

This is a Dart adaptation of the proposed Java code for fun and for learning. Although most of the implementation is near identical to the Java one, there are some adaptations that I chose to made and some simplifications that the Dart language allowed me to do.

After I implement all the proposed code in the book (i.e. up to chapter 13), I am going to implement some of the challenges that the author left, as an extra, and maybe even some personal changes, as long as they don't break the base Lox language. Thus, this can be viewed as a superset of Lox.

Roadmap #

Book roadmap #

  • Scanner (Chapter 4)
  • Basic code representation, visitors (Chapter 5)
  • Expressions (Chapter 6, 7)
  • Statements (Chapter 8)
  • Control Flow (Chapter 9)
  • Functions (Chapter 10)
  • Resolving and Binding (Chapter 11)
  • Classes (Chapter 12)
  • Inheritance (Chapter 13)

Challenges #

  • Multiline comments (Chapter 4, challenge 4)
0
likes
85
pub points
0%
popularity

Publisher

unverified uploader

An implementation of the Lox language in Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

dart_style, meta, quiver, recase

More

Packages that depend on dlox