vshaxe / hxparser

OCaml/menhir implementation of a new Haxe parser.
MIT License
16 stars 2 forks source link

Invalid code behind #if false #4

Closed Gama11 closed 7 years ago

Gama11 commented 7 years ago

https://github.com/HaxeFoundation/format/blob/master/format/tools/CRC32.hx#L35

Missing semicolon in line 35, which I guess worked in Haxe 2? The entire file is wrapped in #if !haxe3 which is probably why it worked so far, so not sure if this one counts either.

static inline function POLYNOM() return Int32.make(0xEDB8, 0x8320)
Gama11 commented 7 years ago

Another one like these in Heaps' Shadow.hx:

Something that's not even Haxe code from the looks of it, but never parsed because of #if false..

Gama11 commented 7 years ago

More of this in Starling:

Simn commented 7 years ago

I can't do anything about these, it's simply not valid Haxe code. I actually came across the first two as well, which is why I added the ignore.txt feature to ignore them.

Gama11 commented 7 years ago

So these would fail to compile in Haxe 4 if the new parser is adopted?

Simn commented 7 years ago

Only if the branch is entered. Currently the parser just always goes for the #if branch because it doesn't evaluate any conditions.

Gama11 commented 7 years ago

I guess I can close this then.