Exemplo n.º 1
0
 //-----------------------------------------------------------------------------
 // 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() + "'"
                ));
 }
Exemplo n.º 2
0
 private void MakeErrorMessage(SymEntry se, ErrorMessage messageType)
 {
     currentError.errorMessage = messageType;
     currentError.lineNumber = se.line;
     currentError.characterNumber = se.charpos;
     currentError.extraInfo1 = se.label;
 }
Exemplo n.º 3
0
 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);
 }