コード例 #1
0
        /// <summary>
        /// Push the given state into the stack. Any missing state information is set to be the active information
        /// </summary>
        /// <param name="curParentScope"></param>
        /// <param name="curSymbolRoleName"></param>
        /// <returns></returns>
        public SymbolTranslatorContext PushState(LanguageScope curParentScope, string curSymbolRoleName)
        {
            var state = new SymbolTranslatorContextState(curParentScope, curSymbolRoleName, ActiveParseNode);

            StateStack.Push(state);

            return(this);
        }
コード例 #2
0
        /// <summary>
        /// Push the given state into the stack. Any missing state information is set to be the active information
        /// </summary>
        /// <param name="curParseNode"></param>
        /// <returns></returns>
        public SymbolTranslatorContext PushState(ParseTreeNode curParseNode)
        {
            var state = new SymbolTranslatorContextState(ActiveParentScope, ActiveSymbolRoleName, curParseNode);

            StateStack.Push(state);

            return(this);
        }
コード例 #3
0
        /// <summary>
        /// Push the given state into the stack
        /// </summary>
        /// <param name="curParentScope"></param>
        /// <param name="curSymbolRoleName"></param>
        /// <param name="curParseNode"></param>
        /// <param name="isCheckpointState"></param>
        /// <returns>The newly pushed state</returns>
        private SymbolTranslatorContext PushState(LanguageScope curParentScope, string curSymbolRoleName, ParseTreeNode curParseNode, bool isCheckpointState)
        {
            var state =
                new SymbolTranslatorContextState(curParentScope, curSymbolRoleName, curParseNode)
            {
                IsCheckPointState = isCheckpointState
            };

            StateStack.Push(state);

            return(this);
        }