massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / @babel / highlight / lib / index.js
index 14ca2e36f86904e3521845fa7011028769f39b59..b8537b26f6ba13df21a6a835eb62d1909a19e1d2 100644 (file)
@@ -3,15 +3,15 @@
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.shouldHighlight = shouldHighlight;
-exports.getChalk = getChalk;
 exports.default = highlight;
+exports.getChalk = getChalk;
+exports.shouldHighlight = shouldHighlight;
 
-var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+var _jsTokens = require("js-tokens");
 
-const jsTokens = require("js-tokens");
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
 
-const Chalk = require("chalk");
+var _chalk = require("chalk");
 
 const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
 
@@ -64,8 +64,9 @@ let tokenize;
   tokenize = function* (text) {
     let match;
 
-    while (match = jsTokens.default.exec(text)) {
-      const token = jsTokens.matchToToken(match);
+    while (match = _jsTokens.default.exec(text)) {
+      const token = _jsTokens.matchToToken(match);
+
       yield {
         type: getTokenType(token, match.index, text),
         value: token.value
@@ -94,14 +95,14 @@ function highlightTokens(defs, text) {
 }
 
 function shouldHighlight(options) {
-  return !!Chalk.supportsColor || options.forceColor;
+  return !!_chalk.supportsColor || options.forceColor;
 }
 
 function getChalk(options) {
-  return options.forceColor ? new Chalk.constructor({
+  return options.forceColor ? new _chalk.constructor({
     enabled: true,
     level: 1
-  }) : Chalk;
+  }) : _chalk;
 }
 
 function highlight(code, options = {}) {