public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("Cast:");
            builder.Indent(indent + 1).AppendFormat("Type: {0}", type).AppendLine();
            builder.Indent(indent + 1).AppendLine("Expression:");
            builder.AppendLine(target.ToString(indent + 2));
            return(builder.ToString());
        }
Esempio n. 2
0
            public override string ToString(int indent)
            {
                StringBuilder builder = new StringBuilder();

                builder.Indent(indent).AppendLine("UnaryOperator:");
                builder.Indent(indent + 1).AppendLine("Operator:");
                builder.Indent(indent + 2).AppendLine(UnaryOperatorType.ToString());
                builder.Indent(indent + 1).AppendLine("Operand:");
                builder.AppendLine(operand.ToString(indent + 2));
                return(builder.ToString());
            }
Esempio n. 3
0
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("Assignment:");
            builder.Indent(indent + 1).AppendLine("Left:");
            builder.AppendLine(left.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Right:");
            builder.AppendLine(right.ToString(indent + 2));
            return(builder.ToString());
        }
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("While:");
            builder.Indent(indent + 1).AppendLine("Condition:");
            builder.AppendLine(condition.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Block:");
            builder.AppendLine(block.ToString(indent + 2));
            return(builder.ToString());
        }
Esempio n. 5
0
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("BinaryOperator:");
            builder.Indent(indent + 1).AppendLine("Left:");
            builder.AppendLine(left.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Operator:");
            builder.Indent(indent + 2).AppendLine(BinaryOperatorType.ToString());
            builder.Indent(indent + 1).AppendLine("Right:");
            builder.AppendLine(right.ToString(indent + 2));
            return(builder.ToString());
        }
Esempio n. 6
0
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("VariableDeclaration:");
            builder.Indent(indent + 1).AppendLine("Symbol:");
            builder.Indent(indent + 2).Append(GetSignature()).AppendLine();
            if (initializer != null)
            {
                builder.Indent(indent + 1).AppendLine("Initializer:");
                builder.AppendLine(initializer.ToString(indent + 2));
            }
            return(builder.ToString());
        }
Esempio n. 7
0
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("ArrayAccess:");
            builder.Indent(indent + 1).AppendLine("Array:");
            builder.Append(array.ToString(indent + 2)).AppendLine();
            builder.Indent(indent + 1).AppendFormat("ElementType: {0}", type.FullName).AppendLine();
            builder.Indent(indent + 1).AppendLine("Indices:");
            foreach (var ind in indices)
            {
                builder.AppendLine(ind.ToString(indent + 2));
            }
            return(builder.ToString());
        }
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("MethodCall:");
            builder.Indent(indent + 1).AppendFormat("ReturnType: {0}", type).AppendLine();
            builder.Indent(indent + 1).Append("Args:").AppendLine();
            foreach (var arg in args)
            {
                builder.AppendLine(arg.ToString(indent + 2));
            }
            builder.Indent(indent + 1).AppendLine("Function:");
            builder.AppendLine(function.ToString(indent + 2));
            return(builder.ToString());
        }
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("For:");
            builder.Indent(indent + 1).AppendLine("Initializer:");
            builder.AppendLine(initializer.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Condition:");
            builder.AppendLine(condition.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Increment:");
            builder.AppendLine(increment.ToString(indent + 2));
            builder.Indent(indent + 1).AppendLine("Body:");
            builder.AppendLine(body.ToString(indent + 2));
            return(builder.ToString());
        }
Esempio n. 10
0
        public override string ToString(int indent)
        {
            StringBuilder builder = new StringBuilder();

            builder.Indent(indent).AppendLine("Return:");
            builder.Indent(indent + 1).AppendLine("Expression:");
            if (expression != null)
            {
                builder.AppendLine(expression.ToString(indent + 2));
            }
            else
            {
                builder.Indent(indent + 2).AppendLine("none");
            }
            return(builder.ToString());
        }