MCPcopy Create free account
hub / github.com/babel/babel / constructor

Method constructor

packages/babel-parser/src/parser/node.ts:17–30  ·  view source on GitHub ↗
(
    optionFlags: OptionFlags,
    filename: string | undefined | null,
    pos: number,
    loc?: Position,
  )

Source from the content-addressed store, hash-verified

15
16class Node implements BaseNode {
17 constructor(
18 optionFlags: OptionFlags,
19 filename: string | undefined | null,
20 pos: number,
21 loc?: Position,
22 ) {
23 this.start = pos;
24 this.end = 0;
25 if (loc !== undefined) this.loc = new SourceLocation(loc);
26 if (optionFlags & OptionFlags.Ranges) this.range = [pos, 0];
27 if (loc !== undefined && filename) {
28 this.loc.filename = filename;
29 }
30 }
31
32 type: string = "";
33 declare start: number;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected