vantreeseba / tree-sitter-haxe

MIT License
26 stars 11 forks source link

Some (newer) Haxe language features are not supported #18

Closed johhnry closed 1 year ago

johhnry commented 1 year ago

Hi (again),

Here are the recent features that are not well handled by the parser:

image

image

image

image

image

And also (giving error when inspecting the tree-sitter tree):

interface ITest {
  function accept(json:{a:Int, b:Float}):Bool;
}
var a = [for (i in 0...5) i];
using ArrayExtensions;
class Main {
    public var x(default, null):Int;

    static public function main() {}
}
abstract class Vehicle {}

image

Thanks!

vantreeseba commented 1 year ago

Hey thanks for the clean feedback, I'll try to get to some of this soon.

vantreeseba commented 1 year ago

I closed this with PR, version is on NPM @ 0.4.0.

Let me know if you see any of these again, there should be tests covering all cases, if not, I would love if you could just add the tests (in the tests/corpus/*.txt whereever it seems to make sense) and make a PR even if it's failing just to help me ensure all cases are covered.

Anyhow, this should fix all these, and thanks again for the through bug report.

johhnry commented 1 year ago

@vantreeseba thank you so much it will improve the DX a lot!