import { Node } from "@pseuco/lang"; export class PseucoWarning { constructor(readonly astNode: Node, readonly domain: string, readonly message: string, readonly hint?: string) {} get description(): string { let lineString = ` in line ${this.astNode.line}`; let columnString = `, column ${this.astNode.column}`; let hintString = (this.hint != undefined) ? ` Hint: ${this.hint}.` : ""; var result = `${this.domain} Warning${lineString}${columnString}: ${this.message} ${hintString}`; return result; } }