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