Exemple #1
0
        public void InitSymbolStatus(ISymbol symbol, SymbolStatus.Kind holdsValue, ILocation location)
        {
            if (mSymbolStatus.ContainsKey(symbol))
            {
                throw new Exception();
            }

            mSymbolStatus[symbol] = new SymbolStatus(symbol, holdsValue, location, true);
        }
Exemple #2
0
 public void UpdateSymbolStatus(ISymbol symbol, SymbolStatus.Kind holdsValue, ILocation location)
 {
     if (mSymbolStatus.TryGetValue(symbol, out var status))
     {
         status.kind     = holdsValue;
         status.location = location;
     }
     else
     {
         mSymbolStatus[symbol] = new SymbolStatus(symbol, holdsValue, location, false);
     }
 }