%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/production/node_modules/sucrase/dist/esm/transformers/
Upload File :
Create Path :
Current File : /www/loslex/production/node_modules/sucrase/dist/esm/transformers/NumericSeparatorTransformer.js

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

import Transformer from "./Transformer";

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

  process() {
    if (this.tokens.matches1(tt.num)) {
      const code = this.tokens.currentTokenCode();
      if (code.includes("_")) {
        this.tokens.replaceToken(code.replace(/_/g, ""));
        return true;
      }
    }
    return false;
  }
}

Zerion Mini Shell 1.0