matches method Null safety

  1. @override
Arg? matches(
  1. ProgramOperation key,
  2. bool userMode
)
override

Implementation

@override
Arg? matches(ProgramOperation key, bool userMode) {
  for (int i = 0; i < _next.length; i++) {
    if (key == Arg.kDigits[i]) {
      return _next[i];
    }
  }
  if (key == Arg.kDot) {
    final nd = _nextOnDot;
    if (nd != null) {
      return nd.matches(key, userMode);
      // Honestly, I don't quite remember why there's the intervening
      // KeyArg(.).  Maybe something to do with f-float-dot on the 16C?
      // Anyway, here we need to skip over it.
    }
  }
  return null;
}