Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tokens.forEach(({ token, context }) => {
let type = null;
switch (context) {
case acorn.tokContexts.j_oTag:
case acorn.tokContexts.j_cTag:
switch (token.type) {
case acorn.tokTypes.jsxTagStart:
case acorn.tokTypes.jsxTagEnd:
case acorn.tokTypes.braceR:
case acorn.tokTypes.eq:
case acorn.tokTypes.slash:
type = 'punctuator';
break;
}
break;
default:
switch (token.type) {
case acorn.tokTypes.num:
type = 'number';
break;