add operand constructors for easier testing

This commit is contained in:
Kevin Ramharak 2019-01-23 09:39:44 +01:00
parent b19eb0568d
commit e8033f3291

View File

@ -36,6 +36,16 @@ public class Operand {
*/
private int data = 0;
public Operand(OperandType type, int value) {
this.type = type;
this.value = value;
}
public Operand(OperandType type, int value, int data) {
this(type, value);
this.data = data;
}
/**
* Create an Operand from text. It assumes that the numerical values that can't be
* parsed are labels that are not defined yet.