You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parse tree will be a function call to foo, rather than a grouping expression in the body of the while loop. To solve this we need some kind of expression separator.
For while we could mandate () around the condition
For while we could have an opening do or similar
For all expressions we could use end of line as a separator. Expressions would only parse infix operators over newlines if they're in a grouping expression?
Some kind of explicit statement separator to fix this in the general case, e.g. ; in C
In general I'm not a fan of the whitespace solution. I'd rather the language wasn't whitespace sensitive. If we move to a traditional if/elif/else block this will become more pressing as the same ambiguity exists there.
The text was updated successfully, but these errors were encountered:
Given the following:
The parse tree will be a function call to foo, rather than a grouping expression in the body of the while loop. To solve this we need some kind of expression separator.
while
we could mandate()
around the conditionwhile
we could have an openingdo
or similar;
in CIn general I'm not a fan of the whitespace solution. I'd rather the language wasn't whitespace sensitive. If we move to a traditional
if
/elif
/else
block this will become more pressing as the same ambiguity exists there.The text was updated successfully, but these errors were encountered: