z80-tools/src/nl/grauw/glass/instructions/Else.java

20 wiersze
502 B
Java

package nl.grauw.glass.instructions;
import nl.grauw.glass.Scope;
import nl.grauw.glass.expressions.Expression;
import nl.grauw.glass.expressions.Schema;
public class Else extends InstructionFactory {
public static Schema ARGUMENTS = new Schema();
@Override
public InstructionObject createObject(Scope context, Expression arguments) {
if (ARGUMENTS.check(arguments)) {
return new Empty.EmptyObject(context);
}
throw new ArgumentException();
}
}