-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Fill out unimplemented expression cases in the ASTPrinter #61601
Comments
cc @louisdh |
Hey, I'm interested in looking at this but I'm not super familiar with the codebase. Do you think this could be an appropriate StarterBug? Thanks |
Sure, I think this would make a suitable StarterBug, it should give you a good sense of how the AST is structured. I'm happy to be pinged with questions :) Feel free to pick off individual nodes, though communicate here what nodes you want to take so people don't end up working on the same thing. |
Sure, thanks. I'll ping with any questions I get, and I'll start with IsExpr and ForceValueExpr. |
Is there room for another contributor? I could take a look at this if you guys don't mind. |
I don’t think anybody is working on this at the moment, so feel free to take it! |
Alright! i'm taking a look into it this weekend. I'm currently a college student and i'm doing my finals, but once i'm done with those i will be making a pull request. Might read a bit of the codebase in the meantime |
Hey guys, given that there are quite a few things, do you think it would be more sensible to try and make a pull request when one is finished rather than make a big one with all of them at the same time? That way we can start merging the stuff just as i finish it, instead of waiting for the full ticket to be completed, and we can keep track of them through the checklist in this issue. |
Either way is fine, if you want to do a PR per, go for it. |
All changes I suppose would be done in the |
@hamishknight Could you give a brief info about this issue, although I have gone through the previous pull request and started digging about AST. |
Yes, that's correct, specifically the
@Rajveer100 This is about being able to print back out expressions from their AST node, e.g we should be able to print |
You mean to say, if the Abstract Syntax Tree (AST) had to evaluate an expression, like a simple math equation (3 * 7 + 13), the resulting type would be of some type (ex. |
Could you also give some example code snippet to 'test' any suitable cases (not necessarily among the implemented cases), for more familiarity. |
@Rajveer100 You can try it out with expressions like |
Well actually I use Xcode WorkSpace, in the scheme, just after the
Without the flag:
(I suppose that was the intended result?) And I couldn't use |
You only need to specify
Indeed that's the expected result
Oh, I assume the Xcode scheme is invoking |
In #40691 we added initial support for printing
Expr
nodes in the ASTPrinter, and #64667 filled out most of the rest. However there are still some expressions left unimplemented, including:These are partially implemented, with outstanding FIXMEs:
Some extras tests would be good for:
The text was updated successfully, but these errors were encountered: