//----------------------------------------------------------------------------- // The symbol is of the wrong type. //----------------------------------------------------------------------------- public static SymbolErrorException BadSymbolType(SymEntry sym, System.Type tExpected, FileRange location) { return(new SymbolErrorException( Code.cBadSymbolType, location, "Symbol '" + sym.Name + "' must be of type '" + tExpected.ToString() + "', not '" + sym.GetType().ToString() + "'" )); }
private void MakeErrorMessage(SymEntry se, ErrorMessage messageType) { currentError.errorMessage = messageType; currentError.lineNumber = se.line; currentError.characterNumber = se.charpos; currentError.extraInfo1 = se.label; }
private void AddSymEntry(int lineNumber, int charPos, string labelName, string fullName, bool isJR, long position, long offsetToFill) { SymEntry se = new SymEntry(); se.line = lineNumber; se.charpos = charPos; se.instructionPosition = position; se.label = labelName; se.fullyQualifiedLabel = fullName; se.isJR = isJR; se.offsetToFill = offsetToFill; symFillTable.Add(se); }