Наследование: While.AST.Statements.Statement
Пример #1
0
 public Procedure(string name, VariableSequence valArgs, Variable resultArg, StatementSequence statements)
 {
     AddChild(valArgs);
     AddChild(resultArg);
     AddChild(statements);
     _name = name;
 }
Пример #2
0
 private StatementSequence ToStatementSequence(Statement s)
 {
     if (s is StatementSequence) {
         return (StatementSequence)s;
     } else {
         StatementSequence seq = new StatementSequence();
         seq.AddStatement(s);
         return seq;
     }
 }
Пример #3
0
 public virtual void Visit(StatementSequence node)
 {
 }
Пример #4
0
 public While(TypedExpression<bool> exp, StatementSequence statements)
 {
     AddChild(exp);
     AddChild(statements);
 }
Пример #5
0
 public If(TypedExpression<bool> exp, StatementSequence ifBranch, StatementSequence elseBranch)
 {
     AddChild(exp);
     AddChild(ifBranch);
     AddChild(elseBranch);
 }
Пример #6
0
 public Block(VariableDeclarationSequence vars, StatementSequence stmts)
 {
     AddChild(vars);
     AddChild(stmts);
 }
Пример #7
0
 public WhileProgram(ProcedureSequence procs, StatementSequence stmts)
 {
     AddChild(procs);
     AddChild(stmts);
 }
        void StmtSeq(out StatementSequence statements)
        {
            Statement stmt;
            statements = new StatementSequence();

            Stmt(out stmt);
            statements.AddStatement(stmt);
            while (la.kind == 11) {
            Get();
            Stmt(out stmt);
            statements.AddStatement(stmt);
            }
        }