www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.internals - Where is checked the right paren closing the condition of an if /

reply Basile B. <b2.temp gmx.com> writes:
Can someone give me the link to the SLOC in parser.d where is 
checked the right parenthesis for example here

if (true) {}
--------^

or here

while (true) {}
-----------^

That's very strange but by following the path

parseExpression
parseAssignExpression
.   .
.   .
.   .
parseUnaryExpression
parsePrimaryExpression
parsePostExpression

I don't see it at all. I expected it at the end but 
well...nothing.
Jun 24 2018
parent Basile B. <b2.temp gmx.com> writes:
On Sunday, 24 June 2018 at 08:30:56 UTC, Basile B. wrote:
 Can someone give me the link to the SLOC in parser.d where is 
 checked the right parenthesis for example here

 if (true) {}
 --------^

 or here

 while (true) {}
 -----------^

 That's very strange but by following the path

 parseExpression
 parseAssignExpression
 .   .
 .   .
 .   .
 parseUnaryExpression
 parsePrimaryExpression
 parsePostExpression

 I don't see it at all. I expected it at the end but 
 well...nothing.
Sorry ignore. I don't know how i've managed to miss it yesterday, it's just at its right place in parseStatement. :/
Jun 24 2018