MCPcopy Index your code
hub / github.com/nodejs/node / constructor

Method constructor

deps/v8/tools/parse-processor.mjs:620–640  ·  view source on GitHub ↗
(name, start, end, script)

Source from the content-addressed store, hash-verified

618
619class Funktion extends CompilationUnit {
620 constructor(name, start, end, script) {
621 super();
622 if (start < 0) throw `invalid start position: ${start}`;
623 if (script.isEval) {
624 if (end < start) throw 'invalid start end positions';
625 } else {
626 if (end <= 0) throw `invalid end position: ${end}`;
627 if (end < start) throw 'invalid start end positions';
628 if (end == start) console.error("Possibly invalid start/end position")
629 }
630
631 this.name = name;
632 this.start = start;
633 this.end = end;
634 this.script = script;
635 this.parent = null;
636 this.nested = [];
637 this.nestingLevel = 0;
638
639 if (script) this.script.addFunktion(this);
640 }
641
642 finalize() {
643 this.lastParseEventTimestamp = Math.max(

Callers

nothing calls this directly

Calls 2

addFunktionMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected