JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour

File "OptionalCatchBindingTransformer.js"

Full Path: /home/u703019046/domains/nawabs.com.au/public_html/node_modules/sucrase/dist/esm/transformers/OptionalCatchBindingTransformer.js
File size: 511 bytes
MIME-type: text/x-java
Charset: utf-8


import {TokenType as tt} from "../parser/tokenizer/types";

import Transformer from "./Transformer";

export default class OptionalCatchBindingTransformer extends Transformer {
  constructor( tokens,  nameManager) {
    super();this.tokens = tokens;this.nameManager = nameManager;;
  }

  process() {
    if (this.tokens.matches2(tt._catch, tt.braceL)) {
      this.tokens.copyToken();
      this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`);
      return true;
    }
    return false;
  }
}