summaryrefslogtreecommitdiff
path: root/node_modules/sucrase/dist/parser/index.js
blob: 35d832a258517160139bc40c0d9dd5be15f4d18d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;