From ebf600bdfc7c88313e3969418feaa9d2e03ad827 Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Thu, 8 Sep 2022 23:35:07 +0200 Subject: [PATCH] Fix parse diagnostics not working --- src/diagnostics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnostics.ts b/src/diagnostics.ts index 7e686d424..1a4107d91 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -136,7 +136,7 @@ export class UnexpectedTokenDiagnostic { public format(): string { return ANSI_FG_RED + ANSI_BOLD + 'fatal: ' + ANSI_RESET + `expected ${describeExpected(this.expected)} but got ${describeActual(this.actual)}\n\n` - + printNode(this.actual) + '\n'; + + printExcerpt(this.file, this.actual.getRange()) + '\n'; } }