RegisterReadArg constructor Null safety
- {required int maxDigit,
- required void f(
- Model<
ProgramOperation> m, - Value v
- Model<
- bool noParenI = false}
Implementation
RegisterReadArg(
{required int maxDigit, required this.f, bool noParenI = false})
: super(synonyms: Arg.registerISynonyms, children: [
DigitArg(max: maxDigit, calc: (m, i) => f(m, m.memory.registers[i])),
...(noParenI
? const []
: [
KeyArg(
key: Arg.kParenI,
child: ArgDone(
(m) => f(m, m.memory.registers.indirectIndex))),
]),
KeyArg(
key: Arg.kI,
child: ArgDone((m) => f(m, m.memory.registers.index))),
]);