Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Parsing failed" with #error #29

Closed
Gama11 opened this issue Feb 29, 2016 · 7 comments
Closed

"Parsing failed" with #error #29

Gama11 opened this issue Feb 29, 2016 · 7 comments

Comments

@Gama11
Copy link
Member

Gama11 commented Feb 29, 2016

Discovered this when running haxe-checkstyle on the std lib. Seems like haxeparser simply doesn't know about #error.

C:\HaxeToolkit\haxe\std/Std.hx:1: character 0 : Error: Parsing failed: { msg => Custom(Please don't add haxe/std to your classpath, instead set HAXE_STD_PATH env var), pos => { file => C:\HaxeToolkit\haxe\std/Std.hx, max => 1177, min => 1171 } }
Stacktrace: 
Called from haxeparser/HaxeParser.hx line 131
Called from hxparse/Parser.hx line 36
Called from hxparse/ParserBuilderImpl.hx line 112
Called from haxeparser/HaxeParser.hx line 265
Called from Checker.hx line 115
Called from Checker.hx line 148
@Simn
Copy link
Collaborator

Simn commented Feb 29, 2016

Did you try that with the development version? I'm pretty sure I have parsed the entire standard library with haxeparser.

@Gama11
Copy link
Member Author

Gama11 commented Feb 29, 2016

The development version of what, Haxe? I'm currently on 3.2.0.

@Simn
Copy link
Collaborator

Simn commented Feb 29, 2016

Of haxeparser

@Gama11
Copy link
Member Author

Gama11 commented Feb 29, 2016

There doesn't really seem to be a development version right now, since master is up to date with the latest haxelib release? And haxe-checkstyle uses that version (3.2.0).

@Simn
Copy link
Collaborator

Simn commented Feb 29, 2016

Oh, I didn't remember I actually made a haxelib release at some point.

This actually works as expected, if you check Std.hx you'll find that the message you're seeing is the one coming from the #error itself. Try defining "cross" via https://github.com/Simn/haxeparser/blob/master/src/haxeparser/HaxeParser.hx#L259.

@Simn Simn closed this as completed Feb 29, 2016
@Simn
Copy link
Collaborator

Simn commented Feb 29, 2016

P.S.: I just checked, haxeparser makes it through the entire std directory with the defines "cross", "scriptable" and "unsafe". See https://github.com/Simn/haxeparser/blob/master/test/TestStd.hx.

@Simn
Copy link
Collaborator

Simn commented Feb 29, 2016

P.S.2: If you know how to we can add that to travis by the way. All it requires is adding this with the correct path to build.hxml:

-D haxe_std_path=C:\github\haxe\std

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants