/** * The three comment spellings: `//` to the end of the line, `/* … *' + '/` across * lines, and the `#` a Python author reaches for. A comment is also where a * `velar-allow` suppression is written, so this is where they are collected. * * D115 §三 / D114 R1f: the comment half of `lexer.ts`. */ import { type AdvisorySuppression } from "../advisory-suppression.ts"; import { type Diagnostic } from "../diagnostic.ts"; import { type Token } from "../token.ts"; /** Everything this half of the lexer asks of the scanner that hosts it, and nothing more. */ export interface CommentScannerHost { advance(): string; adviseFloorDivisionComment(start: number, bodyStart: number, contentEnd: number): void; readonly diagnostics: { push(...reports: readonly Diagnostic[]): void; }; index: number; isAtEnd(): boolean; lineEnd(from: number): number; lineStart(offset: number): number; peek(offset?: number): string; readonly suppressions: AdvisorySuppression[]; readonly text: string; readonly tokens: Token[]; } export declare class CommentScanner { private readonly host; constructor(host: CommentScannerHost); readComment(): void; readBlockComment(): void; blockCommentOwnsLine(): boolean; readHashComment(start: number): boolean; } //# sourceMappingURL=comments.d.ts.map