1 | "use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2 |
|
3 | var _base = require('./traverser/base');
|
4 | var _index3 = require('./traverser/index');
|
5 |
|
6 | class File {
|
7 |
|
8 |
|
9 |
|
10 | constructor(tokens, scopes) {
|
11 | this.tokens = tokens;
|
12 | this.scopes = scopes;
|
13 | }
|
14 | } exports.File = File;
|
15 |
|
16 | function parse(
|
17 | input,
|
18 | isJSXEnabled,
|
19 | isTypeScriptEnabled,
|
20 | isFlowEnabled,
|
21 | ) {
|
22 | if (isFlowEnabled && isTypeScriptEnabled) {
|
23 | throw new Error("Cannot combine flow and typescript plugins.");
|
24 | }
|
25 | _base.initParser.call(void 0, input, isJSXEnabled, isTypeScriptEnabled, isFlowEnabled);
|
26 | const result = _index3.parseFile.call(void 0, );
|
27 | if (_base.state.error) {
|
28 | throw _base.augmentError.call(void 0, _base.state.error);
|
29 | }
|
30 | return result;
|
31 | } exports.parse = parse;
|