summaryrefslogtreecommitdiff
path: root/node_modules/sucrase/dist/parser/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/sucrase/dist/parser/index.js')
-rw-r--r--node_modules/sucrase/dist/parser/index.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/sucrase/dist/parser/index.js b/node_modules/sucrase/dist/parser/index.js
new file mode 100644
index 0000000..35d832a
--- /dev/null
+++ b/node_modules/sucrase/dist/parser/index.js
@@ -0,0 +1,31 @@
+"use strict";Object.defineProperty(exports, "__esModule", {value: true});
+
+var _base = require('./traverser/base');
+var _index = require('./traverser/index');
+
+ class File {
+
+
+
+ constructor(tokens, scopes) {
+ this.tokens = tokens;
+ this.scopes = scopes;
+ }
+} exports.File = File;
+
+ function parse(
+ input,
+ isJSXEnabled,
+ isTypeScriptEnabled,
+ isFlowEnabled,
+) {
+ if (isFlowEnabled && isTypeScriptEnabled) {
+ throw new Error("Cannot combine flow and typescript plugins.");
+ }
+ _base.initParser.call(void 0, input, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled);
+ const result = _index.parseFile.call(void 0, );
+ if (_base.state.error) {
+ throw _base.augmentError.call(void 0, _base.state.error);
+ }
+ return result;
+} exports.parse = parse;