Example #1
0
        private FunctionScope(PathTable pathTable, StringTable stringTable, ISourceFile sourceFile, FunctionScope parentScope)
        {
            Contract.Requires(stringTable != null);
            Contract.Requires(sourceFile != null);

            m_stringTable = stringTable;
            m_sourceFile  = sourceFile;
            m_pathTable   = pathTable;

            m_nextIndex       = parentScope.m_nextIndex;
            Captures          = m_nextIndex;
            m_scopedVarsStack = new Stack <BlockScope>();
            m_scopedVarsStack.Push(new BlockScope(this));
            m_parent         = parentScope;
            m_namespaceScope = null;
            m_sourceFilePath = sourceFile.GetAbsolutePath(pathTable);
        }