Ejemplo n.º 1
0
        public virtual void AddElseClause(IStatement inst, StatementList what)
        {
            var cs = inst as CaseStatement;

            if (cs != null)
            {
                cs.AddElseClause(what);
                return;
            }

            var ifInst = inst as IfStatement;

            if (ifInst != null)
            {
                ifInst.AddElseClause(what);
                return;
            }

            Debug.Assert(inst is UnlessStatement);

            var unlessInst = inst as UnlessStatement;

            unlessInst.AddElseClause(what);
        }
Ejemplo n.º 2
0
 public virtual IStatement NewTableRow(string var, Expression value, StatementList attributes, StatementList statements)
 {
     return(new TableRowStatement(var, value, attributes, statements));
 }
Ejemplo n.º 3
0
 public virtual IStatement NewUnless(Expression expr, StatementList thenBranch, StatementList elseBranch = null)
 {
     return(new UnlessStatement(expr, thenBranch, elseBranch));
 }
Ejemplo n.º 4
0
 public virtual IStatement NewCapture(string var, StatementList statements)
 {
     return(new CaptureStatement(var, statements));
 }
Ejemplo n.º 5
0
 public virtual IStatement NewCycle(string group, StatementList statements)
 {
     return(new CycleStatement(group, statements));
 }
Ejemplo n.º 6
0
 public virtual IStatement Write(Expression value, StatementList filters = null)
 {
     return(new OutputStatement(value, filters));
 }
Ejemplo n.º 7
0
 public virtual IStatement NewFilter(String name, StatementList args)
 {
     return(new FilterStatement(name, args));
 }