Handle() 공개 메소드

public Handle ( Parser context ) : void
context Parser
리턴 void
예제 #1
0
        public INode Parse(IEnumerable <IToken> tokens)
        {
            _tokens       = tokens.GetEnumerator();
            _states       = new Stack <ParseState>();
            _currentState = new ParseState();
            while (_tokens.MoveNext())
            {
                _currentState.Handle(this);
            }

            while (_states.Count > 0)
            {
                EndState();
            }

            return(_currentState.Close());
        }
예제 #2
0
        public INode Parse(IEnumerable<IToken> tokens)
        {
            _tokens = tokens.GetEnumerator();
            _states = new Stack<ParseState>();
            _currentState = new ParseState();
            while (_tokens.MoveNext())
            {
                _currentState.Handle(this);
            }

            while (_states.Count > 0)
            {
                EndState();
            }

            return _currentState.Close();
        }