From cc035af12cbf33d5c02fd02fb127ddf9ce3267f2 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Tue, 17 Nov 2020 18:51:50 +0900 Subject: [PATCH 1/2] Change the parsing in the interpolation not to handle `<` as the tag. --- README.md | 27 + scripts/update-fixtures-ast.js | 9 +- src/ast/errors.ts | 1 + src/common/parser-options.ts | 34 + src/html/parser.ts | 5 +- src/html/tokenizer.ts | 80 +- src/index.ts | 7 +- src/script/index.ts | 21 +- src/script/scope-analyzer.ts | 10 +- src/template/index.ts | 11 +- test/ast.js | 28 +- .../ast.json | 273 ++++ .../parser-options.json | 5 + .../source.vue | 3 + .../token-ranges.json | 11 + .../tree.json | 23 + .../ast.json | 675 ++++++++ .../parser-options.json | 5 + .../source.vue | 3 + .../token-ranges.json | 18 + .../tree.json | 72 + .../ast.json | 1373 +++++++++++++++++ .../parser-options.json | 5 + .../source.vue | 5 + .../token-ranges.json | 34 + .../tree.json | 148 ++ test/fixtures/ast/mustache-in-lt-gt/ast.json | 650 ++++++++ .../fixtures/ast/mustache-in-lt-gt/source.vue | 5 + .../ast/mustache-in-lt-gt/token-ranges.json | 23 + test/fixtures/ast/mustache-in-lt-gt/tree.json | 67 + 30 files changed, 3594 insertions(+), 37 deletions(-) create mode 100644 src/common/parser-options.ts create mode 100644 test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/ast.json create mode 100644 test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/parser-options.json create mode 100644 test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/source.vue create mode 100644 test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/token-ranges.json create mode 100644 test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/tree.json create mode 100644 test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/ast.json create mode 100644 test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/parser-options.json create mode 100644 test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/source.vue create mode 100644 test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/token-ranges.json create mode 100644 test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/tree.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/ast.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/parser-options.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/source.vue create mode 100644 test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/token-ranges.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/tree.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt/ast.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt/source.vue create mode 100644 test/fixtures/ast/mustache-in-lt-gt/token-ranges.json create mode 100644 test/fixtures/ast/mustache-in-lt-gt/tree.json diff --git a/README.md b/README.md index 825afc74..f5e5bda6 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,33 @@ For example: If the `parserOptions.parser` is `false`, the `vue-eslint-parser` skips parsing `