package org.hummingbirdlang.nodes;

import com.oracle.truffle.api.frame.VirtualFrame;

import org.hummingbirdlang.types.realize.InferenceVisitor;

public class HBAssignmentNode extends HBExpressionNode {
  @Child private HBExpressionNode targetNode;
  @Child private HBExpressionNode valueNode;

  public HBAssignmentNode(HBExpressionNode targetNode, HBExpressionNode valueNode) {
    this.targetNode = targetNode;
    this.valueNode = valueNode;
  }

  public void accept(InferenceVisitor visitor) {
    return;
  }

  @Override
  public Object executeGeneric(VirtualFrame frame) {
    return null;
  }
}

@@ -596,11 +596,320 @@
 ull;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    StringBuilder result = new StringBuilder(%22HBAssignmentNode%22);%0A    result.append(%22(%22);%0A    result.append(this.targetNode.toString());%0A    result.append(%22 = %22);%0A    result.append(this.valueNode.toString());%0A    result.append(%22)%22);%0A    return result.toString();%0A  %7D
 %0A%7D%0A

Add custom `toString` for assignment node