AssertScopeStackIsBackToASingleScope() public method

public AssertScopeStackIsBackToASingleScope ( ) : void
return void
        public static SyntaxTreeNode Parse(IEnumerable<SuperSimpleToken> tokens, Type modelType)
        {
            var state = new SuperSimpleTemplateParserState();
            state.PushNewScope(modelType);

            foreach (var token in tokens)
            {
                state.CurrentToken = token;

                foreach (var handler in handlers)
                {
                    if (handler.Key(token))
                    {
                        handler.Value(state);
                        break;
                    }
                }
            }

            state.AssertScopeStackIsBackToASingleScope();
            return state.CurrentBlock;
        }
Esempio n. 2
0
        public static SyntaxTreeNode Parse(IEnumerable <SuperSimpleToken> tokens, Type modelType)
        {
            var state = new SuperSimpleTemplateParserState();

            state.PushNewScope(modelType);

            foreach (var token in tokens)
            {
                state.CurrentToken = token;

                foreach (var handler in handlers)
                {
                    if (handler.Key(token))
                    {
                        handler.Value(state);
                        break;
                    }
                }
            }

            state.AssertScopeStackIsBackToASingleScope();
            return(state.CurrentBlock);
        }