MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / skipEmptyLines

Method skipEmptyLines

src/parser/scanner.ts:684–709  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

682 }
683
684 private skipEmptyLines(): void {
685 while (!this.stream.eof) {
686 // skip spacing
687 if (spaceChars.includes(this.stream.char) || lineBreakChars.includes(this.stream.char)) {
688 this.stream.next();
689 continue;
690 }
691
692 if (this.stream.char === '/') {
693 this.stream.next();
694 if (!this.stream.eof && (this.stream.char as string) === '*') {
695 this.stream.next();
696 this.skipCommentRange();
697 continue;
698 } else if (!this.stream.eof && (this.stream.char as string) === '/') {
699 this.stream.next();
700 this.skipCommentLine();
701 continue;
702 } else {
703 this.stream.prev();
704 break;
705 }
706 }
707 break;
708 }
709 }
710
711 private skipCommentLine(): void {
712 while (true) {

Callers 1

readTokenMethod · 0.95

Calls 4

skipCommentRangeMethod · 0.95
skipCommentLineMethod · 0.95
prevMethod · 0.80
nextMethod · 0.65

Tested by

no test coverage detected