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

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

            return(result);
        }
Beispiel #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);
 }
Beispiel #4
0
 public HostContextFunctionState(SelectorConstructor parent)
 {
     _selector = parent.CreateChild();
 }
Beispiel #5
0
 public MatchesFunctionState(SelectorConstructor parent)
 {
     _selector = parent.CreateChild();
 }
Beispiel #6
0
 public HasFunctionState(SelectorConstructor parent)
 {
     _nested = parent.CreateChild();
 }
Beispiel #7
0
 public NotFunctionState(SelectorConstructor parent)
 {
     _selector          = parent.CreateChild();
     _selector.IsNested = true;
 }