HaxeCheckstyle / haxeparser

A Haxe parser for Haxe
61 stars 23 forks source link

This fixes some things but I'm pretty sure it's the wrong way to fix it #25

Closed dpeek closed 9 years ago

dpeek commented 9 years ago

So, these were failing:

#if foo
    #error "bar"
#end

#if foo
    #error
#end

Because condParser.peek(0) does the same thing as lexerToken() (i.e. there's no token buffer). I'm pretty sure this patch is the wrong way to solve it, although I can now parse std.

dpeek commented 9 years ago

@mcheshkov Simn says you're the right person to ask about this :)

mcheshkov commented 9 years ago

Strange, I think somewhere around conditionals or reification I've parsed std.

dpeek commented 9 years ago

Before this it failed on Std.hx and flash8/ExtendedKey.hx

Simn commented 9 years ago

So should I merge this or not?

dpeek commented 9 years ago

I'm not happy with the fix as I don't completely understand what is going on. I'm pretty sure it is a bug though, perhaps we need to parse more of Std to make it apparent (I was parsing all platforms, and even iterating through different compiler flag iterations I think.

So, close but open an issue?