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
Source position and type cast and brackets #2055
Comments
That is a good question.
I would say yes, otherwise there are part of nothing, no? |
normal SourcePosition has only
while ExpressionSourcePosition will have
I agree that braces should be part of expression too (they are actually not it's part.) |
May be I will have time this evening to have a look at this issue. But I am still not sure about concept of the solution. I will probably create new class Where new class
WDYT? |
It seems good for me. Thanks |
This problem was found by #1927
In the code like
The source position of
null
literal contains only sources "null", but may be there should be type case(File)
and may be also brackets. So source position would contain this:((File) (null))
.But then I would prefer to have more details in source position. So may be we should introduce
ExpressionSourcePosition
, which would be similar toDeclarationSourcePosition
. It means it would have these parts@tdurieux Do you think it would make sense to introduce new
ExpressionSourcePosition
or we can useDeclarationSourcePosition
instead here too? Or may be we do not need that at all and source position of expressions is just simple SourcePosition for some reason?And what about brackets? Are they part of expression or not?
The text was updated successfully, but these errors were encountered: