asCapture method

Pattern asCapture()

Wraps this pattern in a capturing group

Implementation

Pattern asCapture() {
  return Pattern._(
    nodes.Group(capturing: true, body: _node),
    namedGroups: _namedGroups,
  );
}