From e43187d617d33ffbfdbd1121e5166fe8a65fe21b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 23 Nov 2016 00:55:54 +0100 Subject: [PATCH] better pogen error reporting --- pogen/pogen.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pogen/pogen.ts b/pogen/pogen.ts index 090a6efee..441ee3e51 100644 --- a/pogen/pogen.ts +++ b/pogen/pogen.ts @@ -227,7 +227,8 @@ export function processFile(sourceFile: ts.SourceFile) { case ts.SyntaxKind.JsxClosingElement: break; default: - console.error("unrecognized syntax in JSX Element", ts.SyntaxKind[childNode.kind]); + let lc = ts.getLineAndCharacterOfPosition(childNode.getSourceFile(), childNode.getStart()); + console.error(`unrecognized syntax in JSX Element (${childNode.getSourceFile().fileName}:${lc.line}:${lc.character}`); break; } };