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); }
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); } }