-
Notifications
You must be signed in to change notification settings - Fork 3
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
support typechecker desugaring in conversion from Redhat AST #114
Comments
In more limited cases, like for Conditions, The downside is that the resultant Ceylon AST would not represent the original program structure. |
I think I’d prefer to resugar this as well. Or would the desugared version be significantly easier to implement for you? |
In theory, the desugared version requires no work on my part (I think the JVM and JS backends got this feature "for free".) Going forward, re-sugaring will result in triple work. So I'm not sure that's a great idea, especially if this is going to occur more often. OTOH, maybe it is important to be able to perform transformations, pretty-print, etc. when starting with a RH AST. Perhaps @gavinking can weigh in on this. |
Maybe it would be best to do both (if re-sugaring is desirable), and have re-sugaring be controlled by a flag. |
Well we still have this problem with the |
If it makes a difference: I see the current implementation as temporary. It would be much better if we eventually stopped desugaring this syntax and passed the original AST straight to the backends. |
@lucaswerkmeister after thinking about this, I'd prefer the type checker's version of the tree, even if re-sugaring is done for other purposes. It does, for some hard to explain reason, seem "cleaner" to go through re-sugaring. But it adds work and unnecessarily serializes development. Furthermore, I'd like to refactor the Dart compiler so it performs a large backend-neutral de-sugaring (post-typechecking) before code generation. Keeping the de-sugaring is, in a way, consistent with this goal. |
Well if @gavinking plans to remove the current implementation, what should I do? Re-de-sugar and also mock up type information for the new variables? |
Haha, no, I think at that point all the backends will have to deal with it. But I guess the issue is that non-backend users of |
This is for consistency with changes necessary for ceylon#114.
don't assume a token will exist for #114
@lucaswerkmeister if you're happy with the commits above, I think we're good on this one! |
Alright, thanks. |
Wait, which commits above? I think I’ve lost track. Are there some commits in your fork that need to move over into this one? #116 isn’t fixed, right? |
Oh I see, those PRs got merged. Then I guess we can close this now. |
Desugaring performed by the typechecker results in AST that
ceylon.ast.redhat
can't handle (eclipse-archived/ceylon#4406 (comment)):The text was updated successfully, but these errors were encountered: