source: frontend/node_modules/sucrase/dist/esm/parser/traverser/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 478 bytes
Line 
1
2import {nextToken, skipLineComment} from "../tokenizer/index";
3import {charCodes} from "../util/charcodes";
4import {input, state} from "./base";
5import {parseTopLevel} from "./statement";
6
7export function parseFile() {
8 // If enabled, skip leading hashbang line.
9 if (
10 state.pos === 0 &&
11 input.charCodeAt(0) === charCodes.numberSign &&
12 input.charCodeAt(1) === charCodes.exclamationMark
13 ) {
14 skipLineComment(2);
15 }
16 nextToken();
17 return parseTopLevel();
18}
Note: See TracBrowser for help on using the repository browser.