Notes
Missing features
-
TSInput: It’s implemented, alongside
ts_parser_pasrse
, and the latter will call a read function (with the appropriate signature) inside the passed object, but we haven’t implemented anything yet that is usefule. We need to have it in the test suite when done.
Sanitizing
To enable compilation with ASAN do:
SANITIZE=1 rake compile
And then make sure to build the gem and install it:
gem build tree_sitter.gemspec
gem install tree_sitter-version.gem
And finally you can launch it:
-
On Mac OSX:
DYLD_INSERT_LIBRARIES=/full/path/to/asan /full/path/to/ruby ...
-
On Linux:
LD_LOAD=/full/path/to/asan /full/path/to/ruby ...
It’s very important to specify the full path to the ruby executable, otherswise ASAN will fail to load.
To get the full address of LLVM’s ASAN:
-
On Mac OSX:
clang -print-file-name=libclang_rt.asan_osx_dynamic.dylib
-
On Linux:
TODO