This commit is contained in:
MrLetsplay 2024-04-18 21:15:57 +02:00
parent 157c0bf217
commit a960b6d3e7
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -748,6 +748,7 @@ func (p *Parser) tryAssignmentExpression() (*Expression, error) {
} }
if *op != Operator_Equals { if *op != Operator_Equals {
// TODO: incorrect, evaluates lhs twice
operation := getOperation(*op) operation := getOperation(*op)
expr = &Expression{Type: Expression_Binary, Value: BinaryExpression{Left: *lhs, Right: *expr, Operation: operation}, Position: lhs.Position} expr = &Expression{Type: Expression_Binary, Value: BinaryExpression{Left: *lhs, Right: *expr, Operation: operation}, Position: lhs.Position}
} }