How to use the @babel/parser.tokTypes.backQuote function in @babel/parser

To help you get started, we’ve selected a few @babel/parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github resugar / resugar / src / utils / parse.js View on Github external
'classProperties',
    ['decorators', { decoratorsBeforeExport: true }],
    'doExpressions',
    'exponentiationOperator',
    'exportExtensions',
    'functionBind',
    'functionSent',
    'objectRestSpread',
    'trailingFunctionCommas',
    'optionalChaining',
  ],
  tokens: true,
};

Object.defineProperty(tokTypes.backQuote, 'updateContext', {
  value: tokTypes.backQuote.updateContext,
  configurable: false
});

export default function(source: string) {
  return parse(source, BABEL_PARSE_OPTIONS);
}
github resugar / resugar / src / utils / parse.js View on Github external
'classConstructorCall',
    'classProperties',
    ['decorators', { decoratorsBeforeExport: true }],
    'doExpressions',
    'exponentiationOperator',
    'exportExtensions',
    'functionBind',
    'functionSent',
    'objectRestSpread',
    'trailingFunctionCommas',
    'optionalChaining',
  ],
  tokens: true,
};

Object.defineProperty(tokTypes.backQuote, 'updateContext', {
  value: tokTypes.backQuote.updateContext,
  configurable: false
});

export default function(source: string) {
  return parse(source, BABEL_PARSE_OPTIONS);
}

@babel/parser

A JavaScript parser

MIT
Latest version published 9 days ago

Package Health Score

95 / 100
Full package analysis