Example #1
0
 /**
  * Sets the source line and line number, and puts all other values to
  * their initial values, awaiting being set if needed.
  */
 public IntermediateLine(string source, short lineNum)
 {
     Logger.Log("Initializing line " + lineNum, "IntermediateLine");
     this.source = source;
     this.line = lineNum;
     this.LC = null;
     this.lineLabel = null;
     this.category = null;
     this.function = null;
     this.operand = null;
     this.operandLit = OperandParser.Literal.NONE;
     this.directive = null;
     this.dirOperand = null;
     this.dirLitOperand = OperandParser.Literal.NONE;
     this.comment = null;
     this.bytecode = null;
     this.Equated = null;
     this.Fatal = false;
     this.errors = new List<Errors.Error>();
 }
Example #2
0
 /**
  * Converts the current line to a NOP (SOPER ADD,0). Used when an error
  * is throws of severity level serious or higher and the line is
  * invalidated. The corresponding bytecode for a NOP is
  * 1000000000000000, which is equivalent to that of a SOPER ADD,0.
  * Labels and comments will still be preserved, but instructions and
  * directives will not.
  *
  * @refcode D10
  * @errtest
  * @errmsg
  * @author Jacob
  * @creation April 17, 2011
  * @modlog
  *  - April 17, 2011 - Andrew - Removed the last line which also cleared the list of errors.
  *      This caused error output to be blank even though there may have been errors present.
  * @teststandard Andrew
  * @codestandard Mark
  */
 public void NOPificate()
 {
     Logger.Log("Invalidating line " + this.line, "IntermediateLine");
     this.bytecode = "1000000000000000";
     this.category = "SOPER";
     this.function = "ADD";
     this.operand = "0";
     this.operandLit = OperandParser.Literal.NUMBER;
     this.directive = null;
     this.dirOperand = null;
     this.dirLitOperand = OperandParser.Literal.NONE;
     this.Equated = null;
 }