public override AstNode Visit(StringConstant node) { if(node.GetNodeType() == null) { IChelaType stringRefType = ReferenceType.Create(currentModule.TypeMap(ChelaType.GetStringType())); node.SetNodeType(ConstantType.Create(stringRefType)); } if(node.GetNodeValue() == null) node.SetNodeValue(new ConstantValue(node.GetValue())); return node; }
public override AstNode Visit(StringConstant node) { // Begin the node. builder.BeginNode(node); // Load the constant. builder.CreateLoadString(node.GetValue()); // Finish. return builder.EndNode(); }