Exemple #1
0
 public SymParserDocumentContext(string aFileName, SymParserDocumentContext aContext)
 {
     iFileName = aFileName;
     //
     iDefineDirectory  = aContext.DefineDirectory;
     iIncludeDirectory = aContext.IncludeDirectory;
     //
     iDocument = aContext.Document;
     iParser   = aContext.Parser;
 }
        public SymParserDocumentContext PopContext(SymParserDocumentContext aExpected)
        {
            // Can't pop off the last context
            System.Diagnostics.Debug.Assert(iContextStack.Count > 1);
            SymParserDocumentContext top = (SymParserDocumentContext)iContextStack.Peek();

            //
            if (aExpected.Equals(aExpected) == false)
            {
                throw new ArgumentException("Cannot pop context - expectations not met during pop operation");
            }
            //
            iContextStack.Pop();
            return(top);
        }
        public SymParserDocumentContext PopContext()
        {
            SymParserDocumentContext top = (SymParserDocumentContext)iContextStack.Peek();

            return(PopContext(top));
        }
 public void PushContext(SymParserDocumentContext aContext)
 {
     iContextStack.Push(aContext);
 }
 public SymParserDocument(SymParserDocumentContext aContext)
 {
     aContext.Document = this;
     iContextStack.Push(aContext);
 }