public final class InstructionEmitterUnary
extends java.lang.Object
| Constructor and Description |
|---|
InstructionEmitterUnary(java.lang.String name,
java.util.function.Supplier<Instruction> constructor) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
checkArg(int lineNumber,
java.util.regex.Matcher matcher,
java.lang.String name,
java.lang.String previous) |
protected static void |
checkExcess(int lineNumber,
java.util.regex.Matcher matcher,
java.lang.String name) |
protected static Target |
checkTarget(int lineNumber,
java.lang.String name,
int start,
int end) |
protected static java.lang.Object |
checkTargetOrNumber(int lineNumber,
java.lang.String name,
int start,
int end) |
Instruction |
compile(java.util.regex.Matcher matcher,
int lineNumber,
java.util.List<Validator> validators)
Compile an instruction.
|
java.lang.String |
getInstructionName()
The name of the instruction as used in code, e.g.
|
public InstructionEmitterUnary(java.lang.String name,
java.util.function.Supplier<Instruction> constructor)
public java.lang.String getInstructionName()
InstructionEmitterpublic Instruction compile(java.util.regex.Matcher matcher, int lineNumber, java.util.List<Validator> validators) throws ParseException
InstructionEmittermatcher - the matcher used to parse the line.lineNumber - the line number the instruction is on (for exceptions).validators - list of validators instruction emitters may add to.ParseException - if there was a syntax error.protected static void checkExcess(int lineNumber,
java.util.regex.Matcher matcher,
java.lang.String name)
throws ParseException
ParseExceptionprotected static java.lang.String checkArg(int lineNumber,
java.util.regex.Matcher matcher,
java.lang.String name,
java.lang.String previous)
throws ParseException
ParseExceptionprotected static Target checkTarget(int lineNumber, java.lang.String name, int start, int end) throws ParseException
ParseExceptionprotected static java.lang.Object checkTargetOrNumber(int lineNumber,
java.lang.String name,
int start,
int end)
throws ParseException
ParseException