Пример #1
0
        public override void Compile(Compiler compiler, Node node, NodeParent parent)
        {
            var cond = (ConditionalStatement)node;
            Expression cond_expr = cond.Condition;
            if(cond.IsUnless)
                cond_expr = new NotExpression(cond_expr, cond.Location);

            var elseif = cond.ElseStatement != null
                ? new List<ElseIfClause>() { new ElseIfClause(null, new Statements(cond.ElseStatement), cond.ElseStatement.Location) }
                : new List<ElseIfClause>();

            compiler.CompileNode(new IfExpression(cond_expr, new Statements(cond.Body), elseif, cond.Location), parent.CreateChild(node));
        }
Пример #2
0
 public virtual void Exit(NotExpression/*!*/ node) { }
Пример #3
0
 public virtual bool Enter(NotExpression/*!*/ node) { return true; }
Пример #4
0
 public virtual void Exit(NotExpression /*!*/ node)
 {
 }
Пример #5
0
 public virtual bool Enter(NotExpression /*!*/ node)
 {
     return(true);
 }