teal-language / tl

The compiler for Teal, a typed dialect of Lua
MIT License
2.04k stars 101 forks source link

Teal cannot load valid Lua modules #634

Closed catwell closed 1 year ago

catwell commented 1 year ago

I got this error while trying to use Lapis with Teal.

Lapis has a submodule that looks like this, and so it hits this.

Maybe this means we should have a "lax" mode for the parser as well? Lapis keywords should not interfere with Lua code.

hishamhm commented 1 year ago

no, that's just a bug. That "syntax is no longer valid" check should have been only inside record definitions, not inside table literals.

hishamhm commented 1 year ago

I improved the checks for soft keywords, it no longer syntax-errors on the example above.