Close() public method

public Close ( ) : INode
return INode
Example #1
0
        public void EndState()
        {
            var toState = _states.Pop();

            toState.AddOperand(_currentState.Close());
            _currentState = toState;
        }
Example #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());
        }
Example #3
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();
        }