Ejemplo n.º 1
0
            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
            }
Ejemplo n.º 2
0
 static bool _checkForMatchinSpecConditions(DBlockNode m, ConditionSet cs, StaticStatement ss, ResolutionContext ctxt)
 {
     return(ss.Attributes == null || cs.IsMatching(ss.Attributes, ctxt));
 }
Ejemplo n.º 3
0
 static bool _checkForMatchinSpecConditions(DBlockNode m,ConditionSet cs,StaticStatement ss, ResolutionContext ctxt)
 {
     return ss.Attributes == null || cs.IsMatching(ss.Attributes,ctxt);
 }