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
I initially suspected the bug in test47 was related to assignment parsing and tried to fix the parse_assignment function, but it turns out the issue lies elsewhere.
The error message Error: Expected primary expression, found Equal indicates that Wave's variable handling may be the actual cause.
In Wave, var is used for mutable variables and let for constants. However, in test47, the following lines:
a = 12;
b = 5;
seem to fail because a and b are used without prior declaration.
I believe the current variable system does not properly handle implicit declarations or assignments to undeclared identifiers. This might be causing the parser to misinterpret the = as a primary expression error.
I'll now investigate the variable tracking or declaration logic instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I initially suspected the bug in
test47
was related to assignment parsing and tried to fix theparse_assignment
function, but it turns out the issue lies elsewhere.The error message
Error: Expected primary expression, found Equal
indicates that Wave's variable handling may be the actual cause.In Wave,
var
is used for mutable variables andlet
for constants. However, intest47
, the following lines:seem to fail because
a
andb
are used without prior declaration.I believe the current variable system does not properly handle implicit declarations or assignments to undeclared identifiers. This might be causing the parser to misinterpret the
=
as a primary expression error.I'll now investigate the variable tracking or declaration logic instead.
Beta Was this translation helpful? Give feedback.
All reactions