public override void Visit(StatementCondition s) { if (s.Location > caret) { return; } // If the caret is inside this condition block, assume its condition as fulfilled if (s.EndLocation > caret) { if (s.Condition != null) { l.Add(s.Condition); } } else // otherwise check before walking through its child statements { //FIXME: Don't check static if's for now..too slow if (!(s.Condition is StaticIfCondition) && !cs.IsMatching(s.Condition, ctxt)) { return; // and break if e.g. the version is not matching } } ignoreBounds = s.ScopedStatement is BlockStatement; if (s.ScopedStatement != null) { s.ScopedStatement.Accept(this); } //TODO: ElseBlock }
public override void Visit(StatementCondition s) { if (invalidConditionalCodeRegions != null) { switch (CheckCondition(s.Condition)) { case 1: if (s.ElseStatement != null) { invalidConditionalCodeRegions.Add(s.ElseStatement); } if (s.ScopedStatement != null) { s.ScopedStatement.Accept(this); } return; case -1: if (s.ScopedStatement != null) { invalidConditionalCodeRegions.Add(s.ScopedStatement); } if (s.ElseStatement != null) { s.ElseStatement.Accept(this); } return; } } base.Visit(s); }
public virtual void Visit(StatementCondition s) { if (s != null) { if (s.Condition != null) { s.Condition.Accept(this); } VisitChildren(s); } }
public virtual void Visit(StatementCondition s) { if (s != null) { VisitChildren(s); if (s.Condition is StaticIfCondition) { ((StaticIfCondition)s.Condition).Expression.Accept(this); } } }
public virtual void Visit(StatementCondition s) { if(s!=null) { VisitChildren(s); if(s.Condition is StaticIfCondition) ((StaticIfCondition)s.Condition).Expression.Accept(this); } }
public override void Visit(StatementCondition s) { if (s.Location > caret) return; // If the caret is inside this condition block, assume its condition as fulfilled if (s.EndLocation > caret) { if (s.Condition != null) l.Add(s.Condition); } else // otherwise check before walking through its child statements { //FIXME: Don't check static if's for now..too slow if (!(s.Condition is StaticIfCondition) && !cs.IsMatching(s.Condition, ctxt)) return; // and break if e.g. the version is not matching } ignoreBounds = s.ScopedStatement is BlockStatement; if (s.ScopedStatement != null) s.ScopedStatement.Accept(this); //TODO: ElseBlock }
StatementCondition StmtCondition(IStatement Parent, IBlockNode Scope) { var sl = la.Location; var c = Condition(Scope); c.Location = sl; c.EndLocation = t.EndLocation; var sc = new StatementCondition { Condition = c, Location = sl, }; sc.ScopedStatement = Statement(true, false, Scope, sc); if(laKind == Else) { Step(); sc.ElseStatement = Statement(true, false, Scope, sc); } if(IsEOF) sc.EndLocation = la.Location; else sc.EndLocation = t.EndLocation; return sc; }
public virtual void Visit(StatementCondition s) { if(s!=null) { if(s.Condition != null) s.Condition.Accept (this); VisitChildren(s); } }
public void Visit(StatementCondition condition) { }