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
Constructor expressions like MyStruct { field1: 3, field2: 5, ... } currently must be non-empty to avoid parsing conflicts when parsing an expression followed by an empty block. For example, in both if a {} and for i in 0..a {} we would otherwise end up being over-eager when parsing the expression, resulting in us parsing Constructor(name: a, fields: []) as the expression rather than just a.
It may need to be the case that if we parse an empty constructor expression we also need to check the token after it to make sure it continues the expression or is a terminator that is not{ (such as =, ;, or keywords like let, fn in the case of error recovery of a missing semicolon).
The text was updated successfully, but these errors were encountered:
Constructor expressions like
MyStruct { field1: 3, field2: 5, ... }
currently must be non-empty to avoid parsing conflicts when parsing an expression followed by an empty block. For example, in bothif a {}
andfor i in 0..a {}
we would otherwise end up being over-eager when parsing the expression, resulting in us parsingConstructor(name: a, fields: [])
as the expression rather than justa
.It may need to be the case that if we parse an empty constructor expression we also need to check the token after it to make sure it continues the expression or is a terminator that is not
{
(such as=
,;
, or keywords likelet
,fn
in the case of error recovery of a missing semicolon).The text was updated successfully, but these errors were encountered: