public TypeConvertAction(ParseInfo parseInfo, Scope scope, DeltinScriptParser.TypeconvertContext typeConvert)
        {
            Expression = DeltinScript.GetExpression(parseInfo, scope, typeConvert.expr());

            // Get the type. Syntax error if there is none.
            if (typeConvert.PART() == null)
            {
                parseInfo.Script.Diagnostics.Error("Expected type name.", DocRange.GetRange(typeConvert.LESS_THAN()));
            }
            else
            {
                ConvertingTo = parseInfo.TranslateInfo.GetCodeType(typeConvert.PART().GetText(), parseInfo.Script.Diagnostics, DocRange.GetRange(typeConvert.PART()));
            }
        }
        public TypeConvertAction(ParseInfo parseInfo, Scope scope, DeltinScriptParser.TypeconvertContext typeConvert)
        {
            // Get the expression. Syntax error if there is none.
            if (typeConvert.expr() == null)
            {
                parseInfo.Script.Diagnostics.Error("Expected expression.", DocRange.GetRange(typeConvert.GREATER_THAN()));
            }
            else
            {
                Expression = DeltinScript.GetExpression(parseInfo, scope, typeConvert.expr());
            }

            // Get the type. Syntax error if there is none.
            if (typeConvert.code_type() == null)
            {
                parseInfo.Script.Diagnostics.Error("Expected type name.", DocRange.GetRange(typeConvert.LESS_THAN()));
            }
            else
            {
                ConvertingTo = CodeType.GetCodeTypeFromContext(parseInfo, typeConvert.code_type());
            }
        }
 public TypeConvertNode(DeltinScriptParser.TypeconvertContext context, BuildAstVisitor visitor) : base(new Location(visitor.file, DocRange.GetRange(context)))
 {
     Type       = context.PART().GetText();
     Expression = visitor.VisitExpr(context.expr());
 }