예제 #1
0
        private LocalSymbolTable(LocalSymbolTable copyFrom, int maxId)
        {
            IsReadOnly    = false;
            _firstLocalId = copyFrom._firstLocalId;
            _imports      = copyFrom._imports;
            var symbolCount = maxId - _imports.MaxId;

            //copy list
            _mySymbolNames = copyFrom._mySymbolNames.Take(symbolCount).ToList();
            _symbolMap     = BuildSymbolMap();
        }
예제 #2
0
        private LocalSymbolTable(LocalSymbolTableImports imports, IList <string> symbolList, bool readOnly)
        {
            IsReadOnly    = readOnly;
            _imports      = imports;
            _firstLocalId = _imports.MaxId + 1;
            if (symbolList == null || symbolList.Count == 0)
            {
                _mySymbolNames = PrivateHelper.EmptyStringArray;
            }
            else
            {
                _mySymbolNames = symbolList;
            }

            _symbolMap = BuildSymbolMap();
        }