Esempio n. 1
0
 public ChildFunctionState(SelectorConstructor parent, bool withOptionalSelector = true)
 {
     _parent  = parent;
     _allowOf = withOptionalSelector;
     _valid   = true;
     _sign    = 1;
     _state   = ParseState.Initial;
 }
Esempio n. 2
0
        public static ISelector ToPool(this SelectorConstructor ctor)
        {
            var result = ctor.GetResult();

            lock (Lock)
            {
                Selector.Push(ctor);
            }

            return(result);
        }
Esempio n. 3
0
 private bool OnBeforeOf(Token token)
 {
     if (token.Type == TokenType.Whitespace)
     {
         return(false);
     }
     if (token.Data.Isi(Keywords.Of))
     {
         _valid  = _allowOf;
         _state  = ParseState.AfterOf;
         _nested = _parent.CreateChild();
         return(false);
     }
     if (token.Type == TokenType.RoundBracketClose)
     {
         return(true);
     }
     _valid = false;
     return(false);
 }
Esempio n. 4
0
 public HostContextFunctionState(SelectorConstructor parent)
 {
     _selector = parent.CreateChild();
 }
Esempio n. 5
0
 public MatchesFunctionState(SelectorConstructor parent)
 {
     _selector = parent.CreateChild();
 }
Esempio n. 6
0
 public HasFunctionState(SelectorConstructor parent)
 {
     _nested = parent.CreateChild();
 }
Esempio n. 7
0
 public NotFunctionState(SelectorConstructor parent)
 {
     _selector          = parent.CreateChild();
     _selector.IsNested = true;
 }