compileNext method

  1. @override
Parser<RouteResult> compileNext (
  1. Parser<RouteResult> p,
  2. bool isLast
)
override

Implementation

@override
Parser<RouteResult> compileNext(Parser<RouteResult> p, bool isLast) {
  return p.then(_compile().opt()).map((r) {
    if (r.value[1] == null) return r.value[0] as RouteResult;
    return (r.value[0] as RouteResult)
      ..addAll({name: Uri.decodeComponent(r.value[1] as String)});
  });
}