We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2992f6 commit 0c9809cCopy full SHA for 0c9809c
1 file changed
src/Domain/HydraScript.Domain.FrontEnd/Parser/Impl/TopDownParser.Expression.cs
@@ -19,7 +19,13 @@ private Expression Expression()
19
if (expr is MemberExpression lhs && CurrentIs("Assign"))
20
{
21
var assign = Expect("Assign");
22
- return new AssignmentExpression(lhs, Expression())
+ var source = assign.Value is "="
23
+ ? Expression()
24
+ : new BinaryExpression(
25
+ lhs.Empty() ? lhs.Id.Clone() : lhs.Clone(),
26
+ assign.Value[..^1],
27
+ Expression());
28
+ return new AssignmentExpression(lhs, source)
29
{ Segment = assign.Segment };
30
}
31
0 commit comments