Exemple #1
0
        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;
        }
Exemple #2
0
        public override AstNode Visit(StringConstant node)
        {
            // Begin the node.
            builder.BeginNode(node);

            // Load the constant.
            builder.CreateLoadString(node.GetValue());

            // Finish.
            return builder.EndNode();
        }