import { Visitor } from './visitor';

export class MatchVisitor extends Visitor {
  constructor(match) {
    super();

    this.match = match;
  }

  enterNode(node) {
    node = super.enterNode(node);

    node.$matched = this.match(node);

    return node;
  }

  leaveNode(node) {
    return super.leaveNode(node);
  }
}

@@ -259,66 +259,7 @@
 %0A  %7D
-%0A%0A  leaveNode(node) %7B%0A    return super.leaveNode(node);%0A  %7D
 %0A%7D%0A

Remove unnecessary overrides