Skip to content

penelopeysm/lox-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lox-cpp

make
./loxc

by default it builds a debug version, use make BUILD=release to disable that

generating compile_commands.json

this is needed to make clang-based tools (like clangd) work properly.

brew install bear
make clean
bear -- make test

note that building the test target also builds the main programme (so this ensures that compile_commands.json will contain entries for both the main programme and the tests).

tests

brew install pkg-config catch2
make test

differences

I allow

{
  var a = 1;
  {
    var a = a;
  }
}

The initialiser on the right hand side refers to the outer a, not itself. Original Lox errors in this case.

About

Crafting Interpreters part 2, but in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published