Beispiel #1
0
        public override string ToString()
        {
            CommonAST walker = (CommonAST)NodeASTSubTree.getFirstChild();

            string Text = m_Label + walker.getText();

            walker = (CommonAST)walker.getNextSibling();

            while (walker.Type != BoolParserTokenTypes.ASSIGN)
            {
                Text  += "," + walker.getText();
                walker = (CommonAST)walker.getNextSibling();
            }
            Text  += ":=";
            walker = (CommonAST)walker.getNextSibling();
            while (walker != null)
            {
                Text += HelperFunctions.ExprToString(walker);
                if (walker.getNextSibling() != null)
                {
                    Text += ",";
                }
                walker = (CommonAST)walker.getNextSibling();
            }
            Text += ';';

            return(Text);
        }
        public override string ToString()
        {
            string Text = m_Label + "if(";

            Text += HelperFunctions.DeciderToString((CommonAST)NodeASTSubTree.getFirstChild()) + ")";

            return(Text);
        }
        public override string ToString()
        {
            string Text = m_Label + "goto ";

            Text += NodeASTSubTree.getFirstChild().getText() + ";";

            return(Text);
        }
Beispiel #4
0
        override public string ToString()
        {
            string    Text   = m_Label + "assert(";
            CommonAST walker = (CommonAST)NodeASTSubTree.getFirstChild();

            Text += HelperFunctions.DeciderToString(walker);
            Text += ");";

            return(Text);
        }
Beispiel #5
0
        override public string ToString()
        {
            string StatementString = NodeASTSubTree.getText();

            CommonAST ASTChild = (CommonAST)NodeASTSubTree.getFirstChild();

            while (ASTChild != null)
            {
                StatementString += " " + ASTChild.getText();

                ASTChild = (CommonAST)ASTChild.getNextSibling();
            }

            return(StatementString);
        }
        public override string ToString()
        {
            string    Text   = m_Label + "print(";
            CommonAST walker = (CommonAST)NodeASTSubTree.getFirstChild();

            while (walker != null)
            {
                Text += HelperFunctions.ExprToString(walker);
                if (walker.getNextSibling() != null)
                {
                    Text += ",";
                }
                walker = (CommonAST)walker.getNextSibling();
            }
            Text += ");";

            return(Text);
        }