/// <summary> /// Adds the specified symbol to the symbol table and files an error (E0001) /// if the symbol is already defined. /// </summary> /// <param name="name">The symbol name</param> /// <param name="value">The value</param> /// <param name="line">The Line in the source code, used for filing errors</param> /// <param name="column">The Column in the source code, used for filing errors</param> /// <param name="isLabel">Indicates whether the symbol is an Instruction label</param> protected void AddSymbol(string name, int value, int line, int column, bool isLabel) { try { Symbols.Add(name, value); DebugInformation.AddSymbol(Filename, line, name, value, isLabel); } catch (ArgumentException) { Error e = new Error(); e.ID = 1; e.Line = line; e.Column = column; e.Description = string.Format(Messages.E0001, name); Errors.Add(e); } }