(name, start, end, script)
| 618 | |
| 619 | class 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( |
nothing calls this directly
no test coverage detected