From a90f7f94b13e1e6f8f99e29c2e4ba928ed41d8d1 Mon Sep 17 00:00:00 2001 From: pngwn Date: Thu, 3 Sep 2020 23:39:08 +0100 Subject: [PATCH] start moving errors into a single location --- src/compiler/parse/errors.ts | 96 ++++++++++++++++++++++++++++ src/compiler/parse/index.ts | 16 ++--- src/compiler/parse/read/script.ts | 16 ++--- src/compiler/parse/read/style.ts | 26 ++------ src/compiler/parse/state/mustache.ts | 33 ++++------ 5 files changed, 123 insertions(+), 64 deletions(-) create mode 100644 src/compiler/parse/errors.ts diff --git a/src/compiler/parse/errors.ts b/src/compiler/parse/errors.ts new file mode 100644 index 0000000000..383d5394e8 --- /dev/null +++ b/src/compiler/parse/errors.ts @@ -0,0 +1,96 @@ +// All parser errors should be listed and accessed from here + +/** + * @internal + */ +export const template_errors = { + duplicate_style: () => ({ + code: 'duplicate-style', + message: 'You can only have one top-level