franko / luajit-lang-toolkit

A Lua bytecode compiler written in Lua itself for didactic purposes or for new language implementations
Other
647 stars 92 forks source link

AST validation: syntax description for Tables is wrong #30

Open stepelu opened 8 years ago

stepelu commented 8 years ago

According to ast-validate.lua, Tables are expected to be described in terms of the array_entries, hash_keys and hash_values properties.

However, lua-ast.lua generates Tables as with a single keyvals property which is essentially a list of pairs.

As such the validation of AST trees containing Tables is currently failing.

franko commented 8 years ago

Hi Stefano,

of course this need to be fixed. The validator for the table was broken when I merged some proposition of @gnois. We forgot to update the ast-validate stuff.

stepelu commented 8 years ago

I am not sure it can be fixed without updating the various check functions, do you confirm?