removeSettables function

Parser removeSettables (
  1. Parser parser
)

Returns a copy of parser with all settable parsers removed.

Implementation

Parser removeSettables(Parser parser) {
  return transformParser(parser, (each) {
    while (each is SettableParser) {
      each = each.children.first;
    }
    return each;
  });
}