variable method

  1. @override
Parser<Variable> variable()
override

Implementation

@override
Parser<Variable> variable() => super.variable().map((name) {
      if (name == '_') {
        return const Variable('_');
      }
      if (scope.containsKey(name)) {
        return scope[name]!;
      }
      return scope[name] = Variable(name);
    });