euclidianAce / ltreesitter

Standalone tree sitter bindings for the Lua language
MIT License
85 stars 4 forks source link

attempt to index a userdata value on subsequent calls to require #9

Open TorchedSammy opened 2 years ago

TorchedSammy commented 2 years ago

i noticed while trying to add treesitter support to lite xl, any calls after the 1st to ltreesitter.require causes an attempt to index a userdata value error. it seems that on the call after 1st it returns a plain userdata value (somehow) instead of an ltreesitter parser as testing in lua repl shows:

euclidianAce commented 2 years ago

I've fixed this on my end with the above commit. Thanks for reporting and let me know if the issue persists!

takase1121 commented 2 years ago

According to @TorchedSammy it still happens.

TorchedSammy commented 2 years ago

(in lite-xl; seems to be fixed with the same testing in lua repl)