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

Positions and non-Expr stuff #20

Open
mcheshkov opened this issue Oct 29, 2014 · 3 comments
Open

Positions and non-Expr stuff #20

mcheshkov opened this issue Oct 29, 2014 · 3 comments

Comments

@mcheshkov
Copy link
Contributor

I've find that it's really awkward to work with position-related stuff on everything other that Expr. I.e. check style for A->B->C notation of ComplexType, but there's no position information. So one have to infer all that from some higher level position, for EVar i.e. And, since ComplexType is recursive it really means to parse again some part of source.

My proposition is to add Position to more parts of AST. But that means to break compatibility with haxe.macro types and with ocaml AST. I can implement this, in a case.

@mcheshkov
Copy link
Contributor Author

Or implement parse tree generation in hxparse.

@Simn
Copy link
Collaborator

Simn commented Nov 21, 2014

I'm not sure if it's worth deviating from the Haxe AST for this. I acknowledge the problem though. In fact I've come across it even in core Haxe where sometimes I was missing some position information.

@Simn
Copy link
Collaborator

Simn commented Apr 26, 2016

For what it's worth I have added positions to a lot of constructs in Haxe itself. The problem is that this isn't exposed to the macro API because doing that would be a breaking change.

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