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

Issue 1360 - AST changes - haxe #1360

Closed
issuesbot opened this issue May 28, 2013 · 5 comments
Closed

Issue 1360 - AST changes - haxe #1360

issuesbot opened this issue May 28, 2013 · 5 comments

Comments

@issuesbot
Copy link

[Google Issue #1360 : https://code.google.com/p/haxe/issues/detail?id=1360]
by si...@haxe.org, at 03/01/2013, 18:02:50
Reification:
Macro reification currently translates $e{x} expressions to @ $e x using metadata. Should we introduce a proper AST node for this?

Switch default:
The default case of ESwitch was changed to expr option option, with the following meaning:
None -> Switch has no default case
Some None -> Switch has a default case that has no expression
Some -> Switch has a default case with expression
The problem is that this has no proper representation in macro code, because Null<Null<Expr>> makes no sense.

Display:
We might need improved display nodes for planned toplevel completion (issue #327) and IDE support (issue #569).

All these should be added before haxe 3.

@issuesbot
Copy link
Author

[comment from ncanna...@gmail.com, published at 12/01/2013, 13:53:04]
Reification : seems fine this way

Switch : we can allow { expr : null, pos : null|pos } to encode the Some None

Display : I'm not sure that we need some specific syntax for those. Inserting some AST metadata might be done by simply mapping the class field and checking the position

@issuesbot
Copy link
Author

[comment from si...@haxe.org, published at 13/01/2013, 12:44:58]
I don't think expr:null is a good idea, it would require special handling in many places.

@issuesbot
Copy link
Author

[comment from ncanna...@gmail.com, published at 16/01/2013, 21:14:25]
I've made the Switch change, which actually required minimal handling for a quite specific case, closing the issue now.

@issuesbot
Copy link
Author

[comment from si...@haxe.org, published at 16/01/2013, 21:28:35]
I was referring to special handling in macro code because expr:null is a new case. I still don't find this solution particularly elegant, it might trigger obscure macro errors in code that relied on the expr field not being null.

Either way, let's leave this issue open until the ExprTools and Printer functions are adapted to this.

@issuesbot
Copy link
Author

[comment from si...@haxe.org, published at 16/01/2013, 22:53:49]
This issue was closed by revision 299ee4c.

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

1 participant