groove-dev 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/FILE-EDITOR-PLAN.md +253 -0
- package/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/autocomplete/CHANGELOG.md +639 -0
- package/node_modules/@codemirror/autocomplete/LICENSE +21 -0
- package/node_modules/@codemirror/autocomplete/README.md +43 -0
- package/node_modules/@codemirror/autocomplete/dist/index.cjs +2151 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.cts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.ts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.js +2120 -0
- package/node_modules/@codemirror/autocomplete/package.json +41 -0
- package/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/commands/CHANGELOG.md +386 -0
- package/node_modules/@codemirror/commands/LICENSE +21 -0
- package/node_modules/@codemirror/commands/README.md +35 -0
- package/node_modules/@codemirror/commands/dist/index.cjs +1909 -0
- package/node_modules/@codemirror/commands/dist/index.d.cts +650 -0
- package/node_modules/@codemirror/commands/dist/index.d.ts +650 -0
- package/node_modules/@codemirror/commands/dist/index.js +1795 -0
- package/node_modules/@codemirror/commands/package.json +42 -0
- package/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-css/CHANGELOG.md +106 -0
- package/node_modules/@codemirror/lang-css/LICENSE +21 -0
- package/node_modules/@codemirror/lang-css/README.md +50 -0
- package/node_modules/@codemirror/lang-css/dist/index.cjs +269 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.cts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.ts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.js +264 -0
- package/node_modules/@codemirror/lang-css/package.json +42 -0
- package/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-html/CHANGELOG.md +210 -0
- package/node_modules/@codemirror/lang-html/LICENSE +21 -0
- package/node_modules/@codemirror/lang-html/README.md +147 -0
- package/node_modules/@codemirror/lang-html/dist/index.cjs +667 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.cts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.ts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.js +661 -0
- package/node_modules/@codemirror/lang-html/package.json +46 -0
- package/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-javascript/CHANGELOG.md +206 -0
- package/node_modules/@codemirror/lang-javascript/LICENSE +21 -0
- package/node_modules/@codemirror/lang-javascript/README.md +125 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.cjs +526 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.cts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.ts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.js +513 -0
- package/node_modules/@codemirror/lang-javascript/package.json +45 -0
- package/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-json/CHANGELOG.md +59 -0
- package/node_modules/@codemirror/lang-json/LICENSE +21 -0
- package/node_modules/@codemirror/lang-json/README.md +56 -0
- package/node_modules/@codemirror/lang-json/dist/index.cjs +68 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.cts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.ts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.js +64 -0
- package/node_modules/@codemirror/lang-json/package.json +39 -0
- package/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-markdown/CHANGELOG.md +246 -0
- package/node_modules/@codemirror/lang-markdown/LICENSE +21 -0
- package/node_modules/@codemirror/lang-markdown/README.md +162 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.cjs +501 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.cts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.ts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.js +492 -0
- package/node_modules/@codemirror/lang-markdown/package.json +44 -0
- package/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-python/CHANGELOG.md +174 -0
- package/node_modules/@codemirror/lang-python/LICENSE +21 -0
- package/node_modules/@codemirror/lang-python/README.md +61 -0
- package/node_modules/@codemirror/lang-python/dist/index.cjs +313 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.cts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.ts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.js +308 -0
- package/node_modules/@codemirror/lang-python/package.json +42 -0
- package/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/language/CHANGELOG.md +412 -0
- package/node_modules/@codemirror/language/LICENSE +21 -0
- package/node_modules/@codemirror/language/README.md +66 -0
- package/node_modules/@codemirror/language/dist/index.cjs +2742 -0
- package/node_modules/@codemirror/language/dist/index.d.cts +1220 -0
- package/node_modules/@codemirror/language/dist/index.d.ts +1220 -0
- package/node_modules/@codemirror/language/dist/index.js +2687 -0
- package/node_modules/@codemirror/language/package.json +44 -0
- package/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lint/CHANGELOG.md +318 -0
- package/node_modules/@codemirror/lint/LICENSE +21 -0
- package/node_modules/@codemirror/lint/README.md +18 -0
- package/node_modules/@codemirror/lint/dist/index.cjs +958 -0
- package/node_modules/@codemirror/lint/dist/index.d.cts +195 -0
- package/node_modules/@codemirror/lint/dist/index.d.ts +195 -0
- package/node_modules/@codemirror/lint/dist/index.js +945 -0
- package/node_modules/@codemirror/lint/package.json +40 -0
- package/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/search/CHANGELOG.md +324 -0
- package/node_modules/@codemirror/search/LICENSE +21 -0
- package/node_modules/@codemirror/search/README.md +18 -0
- package/node_modules/@codemirror/search/dist/index.cjs +1237 -0
- package/node_modules/@codemirror/search/dist/index.d.cts +385 -0
- package/node_modules/@codemirror/search/dist/index.d.ts +385 -0
- package/node_modules/@codemirror/search/dist/index.js +1217 -0
- package/node_modules/@codemirror/search/package.json +40 -0
- package/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/state/CHANGELOG.md +308 -0
- package/node_modules/@codemirror/state/LICENSE +21 -0
- package/node_modules/@codemirror/state/README.md +18 -0
- package/node_modules/@codemirror/state/dist/index.cjs +3922 -0
- package/node_modules/@codemirror/state/dist/index.d.cts +1713 -0
- package/node_modules/@codemirror/state/dist/index.d.ts +1713 -0
- package/node_modules/@codemirror/state/dist/index.js +3892 -0
- package/node_modules/@codemirror/state/package.json +38 -0
- package/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/theme-one-dark/CHANGELOG.md +97 -0
- package/node_modules/@codemirror/theme-one-dark/LICENSE +21 -0
- package/node_modules/@codemirror/theme-one-dark/README.md +46 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.cjs +139 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.cts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.ts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.js +134 -0
- package/node_modules/@codemirror/theme-one-dark/package.json +41 -0
- package/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/view/CHANGELOG.md +2284 -0
- package/node_modules/@codemirror/view/LICENSE +21 -0
- package/node_modules/@codemirror/view/README.md +37 -0
- package/node_modules/@codemirror/view/dist/index.cjs +11796 -0
- package/node_modules/@codemirror/view/dist/index.d.cts +2389 -0
- package/node_modules/@codemirror/view/dist/index.d.ts +2389 -0
- package/node_modules/@codemirror/view/dist/index.js +11745 -0
- package/node_modules/@codemirror/view/package.json +41 -0
- package/node_modules/@groove-dev/daemon/src/api.js +157 -2
- package/node_modules/@groove-dev/daemon/src/filewatcher.js +59 -0
- package/node_modules/@groove-dev/daemon/src/index.js +28 -1
- package/node_modules/@groove-dev/daemon/src/skills.js +20 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +15 -2
- package/node_modules/@groove-dev/gui/src/App.jsx +3 -0
- package/node_modules/@groove-dev/gui/src/components/CodeEditor.jsx +143 -0
- package/node_modules/@groove-dev/gui/src/components/EditorTabs.jsx +83 -0
- package/node_modules/@groove-dev/gui/src/components/FileTree.jsx +193 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +158 -1
- package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +142 -0
- package/node_modules/@groove-dev/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@lezer/common/LICENSE +21 -0
- package/node_modules/@lezer/common/README.md +14 -0
- package/node_modules/@lezer/common/dist/index.cjs +2209 -0
- package/node_modules/@lezer/common/dist/index.d.cts +1174 -0
- package/node_modules/@lezer/common/dist/index.d.ts +1174 -0
- package/node_modules/@lezer/common/dist/index.js +2196 -0
- package/node_modules/@lezer/common/package.json +32 -0
- package/node_modules/@lezer/css/CHANGELOG.md +307 -0
- package/node_modules/@lezer/css/LICENSE +21 -0
- package/node_modules/@lezer/css/README.md +6 -0
- package/node_modules/@lezer/css/dist/index.cjs +151 -0
- package/node_modules/@lezer/css/dist/index.d.cts +3 -0
- package/node_modules/@lezer/css/dist/index.d.ts +3 -0
- package/node_modules/@lezer/css/dist/index.js +147 -0
- package/node_modules/@lezer/css/package.json +36 -0
- package/node_modules/@lezer/css/rollup.config.js +16 -0
- package/node_modules/@lezer/css/src/css.grammar +290 -0
- package/node_modules/@lezer/css/src/highlight.js +36 -0
- package/node_modules/@lezer/css/src/parser.js +31 -0
- package/node_modules/@lezer/css/src/parser.terms.js +63 -0
- package/node_modules/@lezer/css/src/tokens.js +75 -0
- package/node_modules/@lezer/css/test/declarations.txt +241 -0
- package/node_modules/@lezer/css/test/selector.txt +178 -0
- package/node_modules/@lezer/css/test/statements.txt +227 -0
- package/node_modules/@lezer/css/test/test-css.js +16 -0
- package/node_modules/@lezer/highlight/LICENSE +21 -0
- package/node_modules/@lezer/highlight/README.md +14 -0
- package/node_modules/@lezer/highlight/dist/index.cjs +936 -0
- package/node_modules/@lezer/highlight/dist/index.d.cts +623 -0
- package/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
- package/node_modules/@lezer/highlight/dist/index.js +927 -0
- package/node_modules/@lezer/highlight/package.json +31 -0
- package/node_modules/@lezer/html/CHANGELOG.md +303 -0
- package/node_modules/@lezer/html/LICENSE +21 -0
- package/node_modules/@lezer/html/README.md +37 -0
- package/node_modules/@lezer/html/dist/index.cjs +354 -0
- package/node_modules/@lezer/html/dist/index.d.cts +14 -0
- package/node_modules/@lezer/html/dist/index.d.ts +14 -0
- package/node_modules/@lezer/html/dist/index.js +349 -0
- package/node_modules/@lezer/html/package.json +37 -0
- package/node_modules/@lezer/html/rollup.config.js +16 -0
- package/node_modules/@lezer/html/src/.tern-port +1 -0
- package/node_modules/@lezer/html/src/content.js +87 -0
- package/node_modules/@lezer/html/src/highlight.js +15 -0
- package/node_modules/@lezer/html/src/html.grammar +181 -0
- package/node_modules/@lezer/html/src/index.js +2 -0
- package/node_modules/@lezer/html/src/parser.js +27 -0
- package/node_modules/@lezer/html/src/parser.terms.js +53 -0
- package/node_modules/@lezer/html/src/tokens.js +199 -0
- package/node_modules/@lezer/html/test/mixed.txt +69 -0
- package/node_modules/@lezer/html/test/tags.txt +370 -0
- package/node_modules/@lezer/html/test/test-html.js +29 -0
- package/node_modules/@lezer/html/test/test-incremental.js +97 -0
- package/node_modules/@lezer/html/test/vue.txt +56 -0
- package/node_modules/@lezer/javascript/CHANGELOG.md +485 -0
- package/node_modules/@lezer/javascript/LICENSE +21 -0
- package/node_modules/@lezer/javascript/README.md +14 -0
- package/node_modules/@lezer/javascript/dist/index.cjs +196 -0
- package/node_modules/@lezer/javascript/dist/index.d.cts +3 -0
- package/node_modules/@lezer/javascript/dist/index.d.ts +3 -0
- package/node_modules/@lezer/javascript/dist/index.js +192 -0
- package/node_modules/@lezer/javascript/package.json +36 -0
- package/node_modules/@lezer/javascript/rollup.config.js +16 -0
- package/node_modules/@lezer/javascript/src/highlight.js +62 -0
- package/node_modules/@lezer/javascript/src/javascript.grammar +735 -0
- package/node_modules/@lezer/javascript/src/parser.js +33 -0
- package/node_modules/@lezer/javascript/src/parser.terms.js +177 -0
- package/node_modules/@lezer/javascript/src/tokens.js +87 -0
- package/node_modules/@lezer/javascript/test/decorator.txt +64 -0
- package/node_modules/@lezer/javascript/test/expression.txt +686 -0
- package/node_modules/@lezer/javascript/test/jsx.txt +79 -0
- package/node_modules/@lezer/javascript/test/semicolon.txt +77 -0
- package/node_modules/@lezer/javascript/test/statement.txt +404 -0
- package/node_modules/@lezer/javascript/test/test-javascript.js +17 -0
- package/node_modules/@lezer/javascript/test/typescript.txt +401 -0
- package/node_modules/@lezer/json/CHANGELOG.md +79 -0
- package/node_modules/@lezer/json/LICENSE +21 -0
- package/node_modules/@lezer/json/README.md +7 -0
- package/node_modules/@lezer/json/dist/index.cjs +41 -0
- package/node_modules/@lezer/json/dist/index.d.cts +3 -0
- package/node_modules/@lezer/json/dist/index.d.ts +3 -0
- package/node_modules/@lezer/json/dist/index.js +37 -0
- package/node_modules/@lezer/json/package.json +36 -0
- package/node_modules/@lezer/json/rollup.config.js +15 -0
- package/node_modules/@lezer/json/src/highlight.js +12 -0
- package/node_modules/@lezer/json/src/json.grammar +38 -0
- package/node_modules/@lezer/json/src/parser.js +23 -0
- package/node_modules/@lezer/json/src/parser.terms.js +12 -0
- package/node_modules/@lezer/json/test/arrays.txt +34 -0
- package/node_modules/@lezer/json/test/literals.txt +23 -0
- package/node_modules/@lezer/json/test/numbers.txt +87 -0
- package/node_modules/@lezer/json/test/objects.txt +34 -0
- package/node_modules/@lezer/json/test/strings.txt +50 -0
- package/node_modules/@lezer/json/test/test-json.js +17 -0
- package/node_modules/@lezer/lr/LICENSE +21 -0
- package/node_modules/@lezer/lr/README.md +25 -0
- package/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
- package/node_modules/@lezer/lr/dist/constants.js +5 -0
- package/node_modules/@lezer/lr/dist/index.cjs +1891 -0
- package/node_modules/@lezer/lr/dist/index.d.cts +303 -0
- package/node_modules/@lezer/lr/dist/index.d.ts +303 -0
- package/node_modules/@lezer/lr/dist/index.js +1884 -0
- package/node_modules/@lezer/lr/package.json +32 -0
- package/node_modules/@lezer/markdown/CHANGELOG.md +279 -0
- package/node_modules/@lezer/markdown/LICENSE +21 -0
- package/node_modules/@lezer/markdown/README.md +725 -0
- package/node_modules/@lezer/markdown/bin/build-readme.cjs +39 -0
- package/node_modules/@lezer/markdown/build.js +16 -0
- package/node_modules/@lezer/markdown/dist/index.cjs +2352 -0
- package/node_modules/@lezer/markdown/dist/index.d.cts +600 -0
- package/node_modules/@lezer/markdown/dist/index.d.ts +600 -0
- package/node_modules/@lezer/markdown/dist/index.js +2335 -0
- package/node_modules/@lezer/markdown/package.json +37 -0
- package/node_modules/@lezer/markdown/src/README.md +83 -0
- package/node_modules/@lezer/markdown/src/extension.ts +301 -0
- package/node_modules/@lezer/markdown/src/index.ts +5 -0
- package/node_modules/@lezer/markdown/src/markdown.ts +1961 -0
- package/node_modules/@lezer/markdown/src/nest.ts +46 -0
- package/node_modules/@lezer/markdown/test/compare-tree.ts +14 -0
- package/node_modules/@lezer/markdown/test/spec.ts +79 -0
- package/node_modules/@lezer/markdown/test/test-extension.ts +269 -0
- package/node_modules/@lezer/markdown/test/test-incremental.ts +265 -0
- package/node_modules/@lezer/markdown/test/test-markdown.ts +3574 -0
- package/node_modules/@lezer/markdown/test/test-nesting.ts +86 -0
- package/node_modules/@lezer/markdown/test/tsconfig.json +12 -0
- package/node_modules/@lezer/markdown/tsconfig.json +14 -0
- package/node_modules/@lezer/python/CHANGELOG.md +243 -0
- package/node_modules/@lezer/python/LICENSE +21 -0
- package/node_modules/@lezer/python/README.md +6 -0
- package/node_modules/@lezer/python/dist/index.cjs +330 -0
- package/node_modules/@lezer/python/dist/index.d.cts +3 -0
- package/node_modules/@lezer/python/dist/index.d.ts +3 -0
- package/node_modules/@lezer/python/dist/index.js +326 -0
- package/node_modules/@lezer/python/package.json +36 -0
- package/node_modules/@lezer/python/rollup.config.js +16 -0
- package/node_modules/@lezer/python/src/highlight.js +35 -0
- package/node_modules/@lezer/python/src/python.grammar +381 -0
- package/node_modules/@lezer/python/src/tokens.js +224 -0
- package/node_modules/@lezer/python/test/expression.txt +231 -0
- package/node_modules/@lezer/python/test/statement.txt +442 -0
- package/node_modules/@lezer/python/test/test-incremental.js +33 -0
- package/node_modules/@lezer/python/test/test-python.js +17 -0
- package/node_modules/@marijn/find-cluster-break/LICENSE +21 -0
- package/node_modules/@marijn/find-cluster-break/README.md +28 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.cjs +85 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.d.cts +15 -0
- package/node_modules/@marijn/find-cluster-break/package.json +35 -0
- package/node_modules/@marijn/find-cluster-break/rollup.config.js +7 -0
- package/node_modules/@marijn/find-cluster-break/src/index.d.ts +15 -0
- package/node_modules/@marijn/find-cluster-break/src/index.js +87 -0
- package/node_modules/@marijn/find-cluster-break/test/test-cluster.js +30 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/style-mod/LICENSE +19 -0
- package/node_modules/style-mod/README.md +98 -0
- package/node_modules/style-mod/dist/style-mod.cjs +165 -0
- package/node_modules/style-mod/dist/style-mod.d.cts +16 -0
- package/node_modules/style-mod/package.json +39 -0
- package/node_modules/style-mod/src/README.md +34 -0
- package/node_modules/style-mod/src/style-mod.d.ts +16 -0
- package/node_modules/style-mod/src/style-mod.js +172 -0
- package/node_modules/style-mod/test/test-style-mod.js +104 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +1 -1
- package/packages/daemon/src/api.js +157 -2
- package/packages/daemon/src/filewatcher.js +59 -0
- package/packages/daemon/src/index.js +28 -1
- package/packages/daemon/src/skills.js +20 -0
- package/packages/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +15 -2
- package/packages/gui/src/App.jsx +3 -0
- package/packages/gui/src/components/CodeEditor.jsx +143 -0
- package/packages/gui/src/components/EditorTabs.jsx +83 -0
- package/packages/gui/src/components/FileTree.jsx +193 -0
- package/packages/gui/src/stores/groove.js +158 -1
- package/packages/gui/src/views/FileEditor.jsx +142 -0
- package/packages/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-CNCSwHwH.js +0 -74
- package/packages/gui/dist/assets/index-CNCSwHwH.js +0 -74
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
@top Document { (entity | DoctypeDecl)+ }
|
|
2
|
+
|
|
3
|
+
@dialects { noMatch, selfClosing }
|
|
4
|
+
|
|
5
|
+
entity[@isGroup=Entity] {
|
|
6
|
+
Text |
|
|
7
|
+
EntityReference |
|
|
8
|
+
CharacterReference |
|
|
9
|
+
InvalidEntity |
|
|
10
|
+
Element |
|
|
11
|
+
Comment |
|
|
12
|
+
ProcessingInst |
|
|
13
|
+
IncompleteTag |
|
|
14
|
+
IncompleteCloseTag |
|
|
15
|
+
MismatchedCloseTag |
|
|
16
|
+
NoMatchCloseTag
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Element {
|
|
20
|
+
OpenScriptTag ScriptText (CloseScriptTag | missingCloseTag) |
|
|
21
|
+
OpenStyleTag StyleText (CloseStyleTag | missingCloseTag) |
|
|
22
|
+
OpenTextareaTag TextareaText (CloseTextareaTag | missingCloseTag) |
|
|
23
|
+
OpenTag entity* (CloseTag | missingCloseTag) |
|
|
24
|
+
SelfClosingTag
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
ScriptText[group="TextContent Entity"] { scriptText* }
|
|
28
|
+
|
|
29
|
+
StyleText[group="TextContent Entity"] { styleText* }
|
|
30
|
+
|
|
31
|
+
TextareaText[group="TextContent Entity"] { textareaText* }
|
|
32
|
+
|
|
33
|
+
@skip { space } {
|
|
34
|
+
OpenTag[closedBy=CloseTag,isolate=ltr] {
|
|
35
|
+
StartTag TagName Attribute* EndTag
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
SelfClosingTag[isolate=ltr] {
|
|
39
|
+
StartSelfClosingTag TagName Attribute* (EndTag | SelfClosingEndTag) |
|
|
40
|
+
(StartTag | StartScriptTag | StartStyleTag | StartTextareaTag) TagName Attribute* SelfClosingEndTag
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
MismatchedCloseTag[isolate=ltr] {
|
|
44
|
+
MismatchedStartCloseTag TagName EndTag
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
NoMatchCloseTag[@name=CloseTag,isolate=ltr] {
|
|
48
|
+
NoMatchStartCloseTag TagName EndTag
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
CloseTag[openedBy=OpenTag,isolate=ltr] {
|
|
52
|
+
StartCloseTag TagName EndTag
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
OpenScriptTag[@name=OpenTag,closedBy=CloseTag,isolate=ltr] {
|
|
56
|
+
StartScriptTag TagName Attribute* EndTag
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
CloseScriptTag[@name=CloseTag,openedBy=OpenTag,isolate=ltr] {
|
|
60
|
+
StartCloseScriptTag TagName EndTag
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
OpenStyleTag[@name=OpenTag,closedBy=CloseTag,isolate=ltr] {
|
|
64
|
+
StartStyleTag TagName Attribute* EndTag
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
CloseStyleTag[@name=CloseTag,openedBy=OpenTag,isolate=ltr] {
|
|
68
|
+
StartCloseStyleTag TagName EndTag
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
OpenTextareaTag[@name=OpenTag,closedBy=CloseTag,isolate=ltr] {
|
|
72
|
+
StartTextareaTag TagName Attribute* EndTag
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
CloseTextareaTag[@name=CloseTag,openedBy=OpenTag,isolate=ltr] {
|
|
76
|
+
StartCloseTextareaTag TagName EndTag
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
Attribute {
|
|
80
|
+
AttributeName (Is (AttributeValue | UnquotedAttributeValue))?
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
AttributeValue[isolate] {
|
|
85
|
+
"\"" (attributeContentDouble | EntityReference | CharacterReference | InvalidEntity)* "\"" |
|
|
86
|
+
"\'" (attributeContentSingle | EntityReference | CharacterReference | InvalidEntity)* "\'"
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
Comment[isolate] { commentStart commentContent* commentEnd }
|
|
90
|
+
|
|
91
|
+
@context elementContext from "./tokens.js"
|
|
92
|
+
|
|
93
|
+
@external tokens scriptTokens from "./tokens.js" {
|
|
94
|
+
scriptText
|
|
95
|
+
StartCloseScriptTag[@name=StartCloseTag,closedBy=EndTag]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@external tokens styleTokens from "./tokens.js" {
|
|
99
|
+
styleText
|
|
100
|
+
StartCloseStyleTag[@name=StartCloseTag,closedBy=EndTag]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@external tokens textareaTokens from "./tokens.js" {
|
|
104
|
+
textareaText
|
|
105
|
+
StartCloseTextareaTag[@name=StartCloseTag,closedBy=EndTag]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@external tokens endTag from "./tokens.js" {
|
|
109
|
+
EndTag[openedBy="StartTag StartCloseTag"]
|
|
110
|
+
SelfClosingEndTag[openedBy=StartTag,@dialect=selfClosing]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@external tokens tagStart from "./tokens.js" {
|
|
114
|
+
StartTag[closedBy="EndTag SelfClosingEndTag"],
|
|
115
|
+
StartScriptTag[@name=StartTag,closedBy=EndTag],
|
|
116
|
+
StartStyleTag[@name=StartTag,closedBy=EndTag],
|
|
117
|
+
StartTextareaTag[@name=StartTag,closedBy=EndTag],
|
|
118
|
+
StartSelfClosingTag[@name=StartTag,closedBy=EndTag],
|
|
119
|
+
StartCloseTag[closedBy=EndTag],
|
|
120
|
+
NoMatchStartCloseTag[@name=StartCloseTag,closedBy=EndTag]
|
|
121
|
+
MismatchedStartCloseTag[@name=StartCloseTag,closedBy=EndTag],
|
|
122
|
+
missingCloseTag,
|
|
123
|
+
IncompleteTag,
|
|
124
|
+
IncompleteCloseTag
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@external tokens commentContent from "./tokens.js" {
|
|
128
|
+
commentContent
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@tokens {
|
|
132
|
+
nameStart {
|
|
133
|
+
":" | @asciiLetter | "_" |
|
|
134
|
+
$[\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D] |
|
|
135
|
+
$[\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
nameChar {
|
|
139
|
+
nameStart | "-" | "." | @digit | $[\u00B7\u0300-\u036F\u203F-\u2040]
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
identifier { nameStart nameChar* }
|
|
143
|
+
|
|
144
|
+
TagName { identifier }
|
|
145
|
+
|
|
146
|
+
AttributeName { ![\u0000-\u0020\u007F-\u009F"'<>/=\uFDD0-\uFDEF\uFFFE\uFFFF]+ }
|
|
147
|
+
|
|
148
|
+
UnquotedAttributeValue[isolate] { ![ \t\n\r\u000C=<>"'`]+ }
|
|
149
|
+
|
|
150
|
+
attributeContentDouble { !["&]+ }
|
|
151
|
+
|
|
152
|
+
attributeContentSingle { !['&]+ }
|
|
153
|
+
|
|
154
|
+
Is { "=" }
|
|
155
|
+
|
|
156
|
+
EntityReference { "&" ![#; ]+ ";" }
|
|
157
|
+
|
|
158
|
+
CharacterReference { "&#" ![; ]+ ";" }
|
|
159
|
+
|
|
160
|
+
InvalidEntity { "&" }
|
|
161
|
+
|
|
162
|
+
@precedence { CharacterReference, EntityReference, InvalidEntity }
|
|
163
|
+
|
|
164
|
+
Text[group=TextContent] { ![<&]+ }
|
|
165
|
+
|
|
166
|
+
commentStart { "<!--" }
|
|
167
|
+
commentEnd { "-->" }
|
|
168
|
+
|
|
169
|
+
ProcessingInst { "<?" piContent }
|
|
170
|
+
|
|
171
|
+
piContent { ![?] piContent | "?" piQuestion }
|
|
172
|
+
piQuestion { ![>] piContent | ">" }
|
|
173
|
+
|
|
174
|
+
DoctypeDecl { "<!" ("doctype" | "DOCTYPE") ![>]* ">" }
|
|
175
|
+
|
|
176
|
+
@precedence { commentStart, ProcessingInst, DoctypeDecl }
|
|
177
|
+
|
|
178
|
+
space { (" " | "\t" | "\r" | "\n")+ }
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@external propSource htmlHighlighting from "./highlight"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
2
|
+
import {LRParser} from "@lezer/lr"
|
|
3
|
+
import {scriptTokens, styleTokens, textareaTokens, endTag, tagStart, commentContent, elementContext} from "./tokens.js"
|
|
4
|
+
import {htmlHighlighting} from "./highlight"
|
|
5
|
+
export const parser = LRParser.deserialize({
|
|
6
|
+
version: 14,
|
|
7
|
+
states: ",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G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%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",
|
|
10
|
+
nodeNames: "⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",
|
|
11
|
+
maxTerm: 68,
|
|
12
|
+
context: elementContext,
|
|
13
|
+
nodeProps: [
|
|
14
|
+
["closedBy", -10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],
|
|
15
|
+
["openedBy", 4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],
|
|
16
|
+
["group", -10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],
|
|
17
|
+
["isolate", -11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]
|
|
18
|
+
],
|
|
19
|
+
propSources: [htmlHighlighting],
|
|
20
|
+
skippedNodes: [0],
|
|
21
|
+
repeatNodeCount: 9,
|
|
22
|
+
tokenData: "!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!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!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",
|
|
23
|
+
tokenizers: [scriptTokens, styleTokens, textareaTokens, endTag, tagStart, commentContent, 0, 1, 2, 3, 4, 5],
|
|
24
|
+
topRules: {"Document":[0,16]},
|
|
25
|
+
dialects: {noMatch: 0, selfClosing: 515},
|
|
26
|
+
tokenPrec: 517
|
|
27
|
+
})
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
2
|
+
export const
|
|
3
|
+
scriptText = 55,
|
|
4
|
+
StartCloseScriptTag = 1,
|
|
5
|
+
styleText = 56,
|
|
6
|
+
StartCloseStyleTag = 2,
|
|
7
|
+
textareaText = 57,
|
|
8
|
+
StartCloseTextareaTag = 3,
|
|
9
|
+
EndTag = 4,
|
|
10
|
+
SelfClosingEndTag = 5,
|
|
11
|
+
StartTag = 6,
|
|
12
|
+
StartScriptTag = 7,
|
|
13
|
+
StartStyleTag = 8,
|
|
14
|
+
StartTextareaTag = 9,
|
|
15
|
+
StartSelfClosingTag = 10,
|
|
16
|
+
StartCloseTag = 11,
|
|
17
|
+
NoMatchStartCloseTag = 12,
|
|
18
|
+
MismatchedStartCloseTag = 13,
|
|
19
|
+
missingCloseTag = 58,
|
|
20
|
+
IncompleteTag = 14,
|
|
21
|
+
IncompleteCloseTag = 15,
|
|
22
|
+
commentContent = 59,
|
|
23
|
+
Document = 16,
|
|
24
|
+
Text = 17,
|
|
25
|
+
EntityReference = 18,
|
|
26
|
+
CharacterReference = 19,
|
|
27
|
+
InvalidEntity = 20,
|
|
28
|
+
Element = 21,
|
|
29
|
+
OpenScriptTag = 22,
|
|
30
|
+
TagName = 23,
|
|
31
|
+
Attribute = 24,
|
|
32
|
+
AttributeName = 25,
|
|
33
|
+
Is = 26,
|
|
34
|
+
AttributeValue = 27,
|
|
35
|
+
UnquotedAttributeValue = 28,
|
|
36
|
+
ScriptText = 29,
|
|
37
|
+
CloseScriptTag = 30,
|
|
38
|
+
OpenStyleTag = 31,
|
|
39
|
+
StyleText = 32,
|
|
40
|
+
CloseStyleTag = 33,
|
|
41
|
+
OpenTextareaTag = 34,
|
|
42
|
+
TextareaText = 35,
|
|
43
|
+
CloseTextareaTag = 36,
|
|
44
|
+
OpenTag = 37,
|
|
45
|
+
CloseTag = 38,
|
|
46
|
+
SelfClosingTag = 39,
|
|
47
|
+
Comment = 40,
|
|
48
|
+
ProcessingInst = 41,
|
|
49
|
+
MismatchedCloseTag = 42,
|
|
50
|
+
NoMatchCloseTag = 43,
|
|
51
|
+
DoctypeDecl = 44,
|
|
52
|
+
Dialect_noMatch = 0,
|
|
53
|
+
Dialect_selfClosing = 1
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/* Hand-written tokenizers for HTML. */
|
|
2
|
+
|
|
3
|
+
import {ExternalTokenizer, ContextTracker} from "@lezer/lr"
|
|
4
|
+
import {StartTag, StartCloseTag, NoMatchStartCloseTag, MismatchedStartCloseTag, missingCloseTag,
|
|
5
|
+
StartSelfClosingTag, IncompleteCloseTag, Element, OpenTag, IncompleteTag,
|
|
6
|
+
StartScriptTag, scriptText, StartCloseScriptTag,
|
|
7
|
+
StartStyleTag, styleText, StartCloseStyleTag,
|
|
8
|
+
StartTextareaTag, textareaText, StartCloseTextareaTag,
|
|
9
|
+
Dialect_noMatch, Dialect_selfClosing, EndTag, SelfClosingEndTag,
|
|
10
|
+
commentContent as cmntContent} from "./parser.terms.js"
|
|
11
|
+
|
|
12
|
+
const selfClosers = {
|
|
13
|
+
area: true, base: true, br: true, col: true, command: true,
|
|
14
|
+
embed: true, frame: true, hr: true, img: true, input: true,
|
|
15
|
+
keygen: true, link: true, meta: true, param: true, source: true,
|
|
16
|
+
track: true, wbr: true, menuitem: true
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const implicitlyClosed = {
|
|
20
|
+
dd: true, li: true, optgroup: true, option: true, p: true,
|
|
21
|
+
rp: true, rt: true, tbody: true, td: true, tfoot: true,
|
|
22
|
+
th: true, tr: true
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const closeOnOpen = {
|
|
26
|
+
dd: {dd: true, dt: true},
|
|
27
|
+
dt: {dd: true, dt: true},
|
|
28
|
+
li: {li: true},
|
|
29
|
+
option: {option: true, optgroup: true},
|
|
30
|
+
optgroup: {optgroup: true},
|
|
31
|
+
p: {
|
|
32
|
+
address: true, article: true, aside: true, blockquote: true, dir: true,
|
|
33
|
+
div: true, dl: true, fieldset: true, footer: true, form: true,
|
|
34
|
+
h1: true, h2: true, h3: true, h4: true, h5: true, h6: true,
|
|
35
|
+
header: true, hgroup: true, hr: true, menu: true, nav: true, ol: true,
|
|
36
|
+
p: true, pre: true, section: true, table: true, ul: true
|
|
37
|
+
},
|
|
38
|
+
rp: {rp: true, rt: true},
|
|
39
|
+
rt: {rp: true, rt: true},
|
|
40
|
+
tbody: {tbody: true, tfoot: true},
|
|
41
|
+
td: {td: true, th: true},
|
|
42
|
+
tfoot: {tbody: true},
|
|
43
|
+
th: {td: true, th: true},
|
|
44
|
+
thead: {tbody: true, tfoot: true},
|
|
45
|
+
tr: {tr: true}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function nameChar(ch) {
|
|
49
|
+
return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isSpace(ch) {
|
|
53
|
+
return ch == 9 || ch == 10 || ch == 13 || ch == 32
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let cachedName = null, cachedInput = null, cachedPos = 0
|
|
57
|
+
function tagNameAfter(input, offset) {
|
|
58
|
+
let pos = input.pos + offset
|
|
59
|
+
if (cachedPos == pos && cachedInput == input) return cachedName
|
|
60
|
+
let next = input.peek(offset), name = ""
|
|
61
|
+
for (;;) {
|
|
62
|
+
if (!nameChar(next)) break
|
|
63
|
+
name += String.fromCharCode(next)
|
|
64
|
+
next = input.peek(++offset)
|
|
65
|
+
}
|
|
66
|
+
// Undefined to signal there's a <? or <!, null for just missing
|
|
67
|
+
cachedInput = input; cachedPos = pos
|
|
68
|
+
return cachedName = name ? name.toLowerCase() : next == question || next == bang ? undefined : null
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const lessThan = 60, greaterThan = 62, slash = 47, question = 63, bang = 33, dash = 45
|
|
72
|
+
|
|
73
|
+
function ElementContext(name, parent) {
|
|
74
|
+
this.name = name
|
|
75
|
+
this.parent = parent
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const startTagTerms = [StartTag, StartSelfClosingTag, StartScriptTag, StartStyleTag, StartTextareaTag]
|
|
79
|
+
|
|
80
|
+
export const elementContext = new ContextTracker({
|
|
81
|
+
start: null,
|
|
82
|
+
shift(context, term, stack, input) {
|
|
83
|
+
return startTagTerms.indexOf(term) > -1 ? new ElementContext(tagNameAfter(input, 1) || "", context) : context
|
|
84
|
+
},
|
|
85
|
+
reduce(context, term) {
|
|
86
|
+
return term == Element && context ? context.parent : context
|
|
87
|
+
},
|
|
88
|
+
reuse(context, node, stack, input) {
|
|
89
|
+
let type = node.type.id
|
|
90
|
+
return type == StartTag || type == OpenTag
|
|
91
|
+
? new ElementContext(tagNameAfter(input, 1) || "", context) : context
|
|
92
|
+
},
|
|
93
|
+
strict: false
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
export const tagStart = new ExternalTokenizer((input, stack) => {
|
|
97
|
+
if (input.next != lessThan) {
|
|
98
|
+
// End of file, close any open tags
|
|
99
|
+
if (input.next < 0 && stack.context) input.acceptToken(missingCloseTag)
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
input.advance()
|
|
103
|
+
let close = input.next == slash
|
|
104
|
+
if (close) input.advance()
|
|
105
|
+
let name = tagNameAfter(input, 0)
|
|
106
|
+
if (name === undefined) return
|
|
107
|
+
if (!name) return input.acceptToken(close ? IncompleteCloseTag : IncompleteTag)
|
|
108
|
+
|
|
109
|
+
let parent = stack.context ? stack.context.name : null
|
|
110
|
+
if (close) {
|
|
111
|
+
if (name == parent) return input.acceptToken(StartCloseTag)
|
|
112
|
+
if (parent && implicitlyClosed[parent]) return input.acceptToken(missingCloseTag, -2)
|
|
113
|
+
if (stack.dialectEnabled(Dialect_noMatch)) return input.acceptToken(NoMatchStartCloseTag)
|
|
114
|
+
for (let cx = stack.context; cx; cx = cx.parent) if (cx.name == name) return
|
|
115
|
+
input.acceptToken(MismatchedStartCloseTag)
|
|
116
|
+
} else {
|
|
117
|
+
if (name == "script") return input.acceptToken(StartScriptTag)
|
|
118
|
+
if (name == "style") return input.acceptToken(StartStyleTag)
|
|
119
|
+
if (name == "textarea") return input.acceptToken(StartTextareaTag)
|
|
120
|
+
if (selfClosers.hasOwnProperty(name)) return input.acceptToken(StartSelfClosingTag)
|
|
121
|
+
if (parent && closeOnOpen[parent] && closeOnOpen[parent][name]) input.acceptToken(missingCloseTag, -1)
|
|
122
|
+
else input.acceptToken(StartTag)
|
|
123
|
+
}
|
|
124
|
+
}, {contextual: true})
|
|
125
|
+
|
|
126
|
+
export const commentContent = new ExternalTokenizer(input => {
|
|
127
|
+
for (let dashes = 0, i = 0;; i++) {
|
|
128
|
+
if (input.next < 0) {
|
|
129
|
+
if (i) input.acceptToken(cmntContent)
|
|
130
|
+
break
|
|
131
|
+
}
|
|
132
|
+
if (input.next == dash) {
|
|
133
|
+
dashes++
|
|
134
|
+
} else if (input.next == greaterThan && dashes >= 2) {
|
|
135
|
+
if (i >= 3) input.acceptToken(cmntContent, -2)
|
|
136
|
+
break
|
|
137
|
+
} else {
|
|
138
|
+
dashes = 0
|
|
139
|
+
}
|
|
140
|
+
input.advance()
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
function inForeignElement(context) {
|
|
145
|
+
for (; context; context = context.parent)
|
|
146
|
+
if (context.name == "svg" || context.name == "math") return true
|
|
147
|
+
return false
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const endTag = new ExternalTokenizer((input, stack) => {
|
|
151
|
+
if (input.next == slash && input.peek(1) == greaterThan) {
|
|
152
|
+
let selfClosing = stack.dialectEnabled(Dialect_selfClosing) || inForeignElement(stack.context)
|
|
153
|
+
input.acceptToken(selfClosing ? SelfClosingEndTag : EndTag, 2)
|
|
154
|
+
} else if (input.next == greaterThan) {
|
|
155
|
+
input.acceptToken(EndTag, 1)
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
function contentTokenizer(tag, textToken, endToken) {
|
|
160
|
+
let lastState = 2 + tag.length
|
|
161
|
+
return new ExternalTokenizer(input => {
|
|
162
|
+
// state means:
|
|
163
|
+
// - 0 nothing matched
|
|
164
|
+
// - 1 '<' matched
|
|
165
|
+
// - 2 '</'
|
|
166
|
+
// - 3-(1+tag.length) part of the tag matched
|
|
167
|
+
// - lastState whole tag + possibly whitespace matched
|
|
168
|
+
for (let state = 0, matchedLen = 0, i = 0;; i++) {
|
|
169
|
+
if (input.next < 0) {
|
|
170
|
+
if (i) input.acceptToken(textToken)
|
|
171
|
+
break
|
|
172
|
+
}
|
|
173
|
+
if (state == 0 && input.next == lessThan ||
|
|
174
|
+
state == 1 && input.next == slash ||
|
|
175
|
+
state >= 2 && state < lastState && input.next == tag.charCodeAt(state - 2)) {
|
|
176
|
+
state++
|
|
177
|
+
matchedLen++
|
|
178
|
+
} else if (state == lastState && input.next == greaterThan) {
|
|
179
|
+
if (i > matchedLen)
|
|
180
|
+
input.acceptToken(textToken, -matchedLen)
|
|
181
|
+
else
|
|
182
|
+
input.acceptToken(endToken, -(matchedLen - 2))
|
|
183
|
+
break
|
|
184
|
+
} else if ((input.next == 10 /* '\n' */ || input.next == 13 /* '\r' */) && i) {
|
|
185
|
+
input.acceptToken(textToken, 1)
|
|
186
|
+
break
|
|
187
|
+
} else {
|
|
188
|
+
state = matchedLen = 0
|
|
189
|
+
}
|
|
190
|
+
input.advance()
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export const scriptTokens = contentTokenizer("script", scriptText, StartCloseScriptTag)
|
|
196
|
+
|
|
197
|
+
export const styleTokens = contentTokenizer("style", styleText, StartCloseStyleTag)
|
|
198
|
+
|
|
199
|
+
export const textareaTokens = contentTokenizer("textarea", textareaText, StartCloseTextareaTag)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Doesn't parse VB as JS
|
|
2
|
+
|
|
3
|
+
<script type="text/visualbasic">let something = 20</script>
|
|
4
|
+
|
|
5
|
+
==>
|
|
6
|
+
|
|
7
|
+
Document(Element(OpenTag(StartTag,TagName,Attribute(AttributeName,Is,AttributeValue),EndTag),
|
|
8
|
+
ScriptText,
|
|
9
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|
|
10
|
+
|
|
11
|
+
# Does parse type-less script tags as JS
|
|
12
|
+
|
|
13
|
+
<script>/foo/</script>
|
|
14
|
+
|
|
15
|
+
==>
|
|
16
|
+
|
|
17
|
+
Document(Element(OpenTag(StartTag,TagName,EndTag),
|
|
18
|
+
Script(ExpressionStatement(RegExp)),
|
|
19
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|
|
20
|
+
|
|
21
|
+
# Still doesn't end script tags on closing tags
|
|
22
|
+
|
|
23
|
+
<script type=something></foo></script>
|
|
24
|
+
|
|
25
|
+
==>
|
|
26
|
+
|
|
27
|
+
Document(Element(OpenTag(StartTag,TagName,Attribute(AttributeName,Is,UnquotedAttributeValue),EndTag),
|
|
28
|
+
ScriptText,
|
|
29
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|
|
30
|
+
|
|
31
|
+
# Missing end tag
|
|
32
|
+
|
|
33
|
+
<html><script>null
|
|
34
|
+
|
|
35
|
+
==>
|
|
36
|
+
|
|
37
|
+
Document(Element(OpenTag(StartTag,TagName,EndTag),
|
|
38
|
+
Element(OpenTag(StartTag,TagName,EndTag),
|
|
39
|
+
Script(ExpressionStatement(null)))))
|
|
40
|
+
|
|
41
|
+
# JS with script type
|
|
42
|
+
|
|
43
|
+
<script type="text/javascript">console.log(2)</script>
|
|
44
|
+
|
|
45
|
+
==>
|
|
46
|
+
|
|
47
|
+
Document(Element(OpenTag(StartTag,TagName,Attribute(AttributeName,Is,AttributeValue),EndTag),
|
|
48
|
+
Script(...),
|
|
49
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|
|
50
|
+
|
|
51
|
+
# JS with unquoted script type
|
|
52
|
+
|
|
53
|
+
<script type=module>console.log(2)</script>
|
|
54
|
+
|
|
55
|
+
==>
|
|
56
|
+
|
|
57
|
+
Document(Element(OpenTag(StartTag,TagName,Attribute(AttributeName,Is,UnquotedAttributeValue),EndTag),
|
|
58
|
+
Script(...),
|
|
59
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|
|
60
|
+
|
|
61
|
+
# Error in JS
|
|
62
|
+
|
|
63
|
+
<script>a b</script>
|
|
64
|
+
|
|
65
|
+
==>
|
|
66
|
+
|
|
67
|
+
Document(Element(OpenTag(StartTag,TagName,EndTag),
|
|
68
|
+
Script(...),
|
|
69
|
+
CloseTag(StartCloseTag,TagName,EndTag)))
|