albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
894 stars 148 forks source link

AST type checker #58

Open mingodad opened 8 years ago

mingodad commented 8 years ago

Hello ! Would be nice to have an AST generator type checker for Squirrel/SquiLu, there is some work that can be reused to this: https://github.com/evanw/esprima-cpp https://github.com/kabergstrom/sqip With the AST we could make the type checker/inference similar to what Haxe has: http://haxe.org/manual/type-system-type-inference.html

Cheers !

zeromus commented 8 years ago

You can find the type of something in squirrel with typeof(expression). I don't understand why you think the thing Haxe doing is important? I would rather see this written in squirrel, so users can then build optimizations on top of it without the core squirrel compiler getting more complex.