groove-dev 0.15.1 → 0.16.1
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 +268 -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/mimetypes.js +43 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-BQSznoq0.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 +492 -0
- package/node_modules/@groove-dev/gui/src/components/MediaViewer.jsx +104 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +287 -1
- package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +149 -0
- 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 +268 -2
- package/packages/daemon/src/filewatcher.js +59 -0
- package/packages/daemon/src/index.js +28 -1
- package/packages/daemon/src/mimetypes.js +43 -0
- package/packages/gui/dist/assets/index-BQSznoq0.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 +492 -0
- package/packages/gui/src/components/MediaViewer.jsx +104 -0
- package/packages/gui/src/stores/groove.js +287 -1
- package/packages/gui/src/views/FileEditor.jsx +149 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-8Kqi_LVo.js +0 -74
- package/packages/gui/dist/assets/index-8Kqi_LVo.js +0 -74
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
2
|
+
export const
|
|
3
|
+
descendantOp = 135,
|
|
4
|
+
Unit = 1,
|
|
5
|
+
identifier = 136,
|
|
6
|
+
callee = 137,
|
|
7
|
+
VariableName = 2,
|
|
8
|
+
queryIdentifier = 138,
|
|
9
|
+
queryVariableName = 3,
|
|
10
|
+
QueryCallee = 4,
|
|
11
|
+
Comment = 5,
|
|
12
|
+
StyleSheet = 6,
|
|
13
|
+
RuleSet = 7,
|
|
14
|
+
UniversalSelector = 8,
|
|
15
|
+
NestingSelector = 14,
|
|
16
|
+
PseudoClassName = 22,
|
|
17
|
+
AtKeyword = 28,
|
|
18
|
+
ColorLiteral = 37,
|
|
19
|
+
NumberLiteral = 38,
|
|
20
|
+
StringLiteral = 39,
|
|
21
|
+
BinOp = 41,
|
|
22
|
+
CallExpression = 42,
|
|
23
|
+
IfExpression = 44,
|
|
24
|
+
_if = 45,
|
|
25
|
+
IfBranch = 47,
|
|
26
|
+
FeatureName = 50,
|
|
27
|
+
LogicOp = 52,
|
|
28
|
+
CompareOp = 54,
|
|
29
|
+
UnaryQueryOp = 56,
|
|
30
|
+
selector = 59,
|
|
31
|
+
ParenthesizedSelector = 60,
|
|
32
|
+
CallLiteral = 65,
|
|
33
|
+
CallTag = 66,
|
|
34
|
+
ParenthesizedContent = 67,
|
|
35
|
+
MatchOp = 77,
|
|
36
|
+
MatchFlag = 78,
|
|
37
|
+
ChildOp = 80,
|
|
38
|
+
SiblingOp = 83,
|
|
39
|
+
Block = 84,
|
|
40
|
+
Declaration = 85,
|
|
41
|
+
Important = 87,
|
|
42
|
+
ImportStatement = 88,
|
|
43
|
+
_import = 89,
|
|
44
|
+
layer = 93,
|
|
45
|
+
LayerName = 92,
|
|
46
|
+
MediaStatement = 94,
|
|
47
|
+
media = 95,
|
|
48
|
+
CharsetStatement = 96,
|
|
49
|
+
charset = 97,
|
|
50
|
+
NamespaceStatement = 98,
|
|
51
|
+
namespace = 99,
|
|
52
|
+
KeyframesStatement = 101,
|
|
53
|
+
keyframes = 102,
|
|
54
|
+
KeyframeList = 104,
|
|
55
|
+
KeyframeSelector = 105,
|
|
56
|
+
SupportsStatement = 107,
|
|
57
|
+
supports = 108,
|
|
58
|
+
ScopeStatement = 109,
|
|
59
|
+
scope = 110,
|
|
60
|
+
to = 111,
|
|
61
|
+
FontFeatureStatement = 112,
|
|
62
|
+
AtRule = 115,
|
|
63
|
+
Styles = 116
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* Hand-written tokenizers for CSS tokens that can't be
|
|
2
|
+
expressed by Lezer's built-in tokenizer. */
|
|
3
|
+
|
|
4
|
+
import {ExternalTokenizer} from "@lezer/lr"
|
|
5
|
+
import {
|
|
6
|
+
identifier, callee, VariableName,
|
|
7
|
+
queryIdentifier, queryVariableName, QueryCallee,
|
|
8
|
+
descendantOp, Unit
|
|
9
|
+
} from "./parser.terms.js"
|
|
10
|
+
|
|
11
|
+
const space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197,
|
|
12
|
+
8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288]
|
|
13
|
+
const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46,
|
|
14
|
+
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42
|
|
15
|
+
|
|
16
|
+
function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 }
|
|
17
|
+
|
|
18
|
+
function isDigit(ch) { return ch >= 48 && ch <= 57 }
|
|
19
|
+
|
|
20
|
+
function isHex(ch) { return isDigit(ch) || ch >= 97 && ch <= 102 || ch >= 65 && ch <= 70 }
|
|
21
|
+
|
|
22
|
+
const identifierTokens = (id, varName, callee) => (input, stack) => {
|
|
23
|
+
for (let inside = false, dashes = 0, i = 0;; i++) {
|
|
24
|
+
let {next} = input
|
|
25
|
+
if (isAlpha(next) || next == dash || next == underscore || (inside && isDigit(next))) {
|
|
26
|
+
if (!inside && (next != dash || i > 0)) inside = true
|
|
27
|
+
if (dashes === i && next == dash) dashes++
|
|
28
|
+
input.advance()
|
|
29
|
+
} else if (next == backslash && input.peek(1) != newline) {
|
|
30
|
+
input.advance()
|
|
31
|
+
if (isHex(input.next)) {
|
|
32
|
+
do { input.advance() } while (isHex(input.next))
|
|
33
|
+
if (input.next == 32) input.advance()
|
|
34
|
+
} else if (input.next > -1) {
|
|
35
|
+
input.advance()
|
|
36
|
+
}
|
|
37
|
+
inside = true
|
|
38
|
+
} else {
|
|
39
|
+
if (inside) input.acceptToken(
|
|
40
|
+
dashes == 2 && stack.canShift(VariableName) ? varName : next == parenL ? callee : id
|
|
41
|
+
)
|
|
42
|
+
break
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const identifiers = new ExternalTokenizer(
|
|
48
|
+
identifierTokens(identifier, VariableName, callee),
|
|
49
|
+
{contextual: true}
|
|
50
|
+
)
|
|
51
|
+
export const queryIdentifiers = new ExternalTokenizer(
|
|
52
|
+
identifierTokens(queryIdentifier, queryVariableName, QueryCallee),
|
|
53
|
+
{contextual: true}
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
export const descendant = new ExternalTokenizer(input => {
|
|
57
|
+
if (space.includes(input.peek(-1))) {
|
|
58
|
+
let {next} = input
|
|
59
|
+
if (isAlpha(next) || next == underscore || next == hash || next == period ||
|
|
60
|
+
next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) ||
|
|
61
|
+
next == dash || next == ampersand)
|
|
62
|
+
input.acceptToken(descendantOp)
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const unitToken = new ExternalTokenizer(input => {
|
|
67
|
+
if (!space.includes(input.peek(-1))) {
|
|
68
|
+
let {next} = input
|
|
69
|
+
if (next == percent) { input.advance(); input.acceptToken(Unit) }
|
|
70
|
+
if (isAlpha(next)) {
|
|
71
|
+
do { input.advance() } while (isAlpha(input.next) || isDigit(input.next))
|
|
72
|
+
input.acceptToken(Unit)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
})
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Function calls
|
|
2
|
+
|
|
3
|
+
a {
|
|
4
|
+
color: rgba(0, 255, 0, 0.5);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
==>
|
|
8
|
+
|
|
9
|
+
StyleSheet(
|
|
10
|
+
RuleSet(TagSelector(TagName),Block(
|
|
11
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(NumberLiteral,NumberLiteral,NumberLiteral,NumberLiteral))))))
|
|
12
|
+
|
|
13
|
+
# Calls where each argument has multiple values
|
|
14
|
+
|
|
15
|
+
div {
|
|
16
|
+
background: repeating-linear-gradient(red, orange 50px);
|
|
17
|
+
clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
==>
|
|
21
|
+
|
|
22
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
23
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(ValueName,ValueName,NumberLiteral(Unit)))),
|
|
24
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(
|
|
25
|
+
NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),
|
|
26
|
+
NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),
|
|
27
|
+
NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),
|
|
28
|
+
NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit)))))))
|
|
29
|
+
|
|
30
|
+
# Color literals
|
|
31
|
+
|
|
32
|
+
a {
|
|
33
|
+
b: #fafd04;
|
|
34
|
+
c: #fafd0401;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
==>
|
|
38
|
+
|
|
39
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
40
|
+
Declaration(PropertyName,ColorLiteral),
|
|
41
|
+
Declaration(PropertyName,ColorLiteral))))
|
|
42
|
+
|
|
43
|
+
# Numbers
|
|
44
|
+
|
|
45
|
+
a {
|
|
46
|
+
b: 0.5%;
|
|
47
|
+
c: 5em;
|
|
48
|
+
margin: 10E3px;
|
|
49
|
+
margin: -456.8px;
|
|
50
|
+
margin: -0.0px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
==>
|
|
54
|
+
|
|
55
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
56
|
+
Declaration(PropertyName,NumberLiteral(Unit)),
|
|
57
|
+
Declaration(PropertyName,NumberLiteral(Unit)),
|
|
58
|
+
Declaration(PropertyName,NumberLiteral(Unit)),
|
|
59
|
+
Declaration(PropertyName,NumberLiteral(Unit)),
|
|
60
|
+
Declaration(PropertyName,NumberLiteral(Unit)))))
|
|
61
|
+
|
|
62
|
+
# Binary arithmetic operators
|
|
63
|
+
|
|
64
|
+
a {
|
|
65
|
+
width: calc(100% - 80px);
|
|
66
|
+
aspect-ratio: 1/2;
|
|
67
|
+
font-size: calc(10px + (56 - 10) * ((100vw - 320px) / (1920 - 320)));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
==>
|
|
71
|
+
|
|
72
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
73
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(BinaryExpression(NumberLiteral(Unit),BinOp,NumberLiteral(Unit))))),
|
|
74
|
+
Declaration(PropertyName,BinaryExpression(NumberLiteral,BinOp,NumberLiteral)),
|
|
75
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(
|
|
76
|
+
BinaryExpression(BinaryExpression(NumberLiteral(Unit),BinOp,ParenthesizedValue(
|
|
77
|
+
BinaryExpression(NumberLiteral,BinOp,NumberLiteral))),BinOp,ParenthesizedValue(
|
|
78
|
+
BinaryExpression(ParenthesizedValue(BinaryExpression(NumberLiteral(Unit),BinOp,NumberLiteral(Unit))),BinOp,
|
|
79
|
+
ParenthesizedValue(BinaryExpression(NumberLiteral,BinOp,NumberLiteral)))))))))))
|
|
80
|
+
|
|
81
|
+
# Strings
|
|
82
|
+
|
|
83
|
+
a {
|
|
84
|
+
b: '';
|
|
85
|
+
c: '\'hi\'';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
==>
|
|
89
|
+
|
|
90
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(Declaration(PropertyName,StringLiteral),Declaration(PropertyName,StringLiteral))))
|
|
91
|
+
|
|
92
|
+
# URLs
|
|
93
|
+
|
|
94
|
+
a {
|
|
95
|
+
b: url(http://something-else?foo=bar);
|
|
96
|
+
c: url();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
==>
|
|
100
|
+
|
|
101
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
102
|
+
Declaration(PropertyName,CallLiteral(CallTag,ParenthesizedContent)),
|
|
103
|
+
Declaration(PropertyName,CallLiteral(CallTag)))))
|
|
104
|
+
|
|
105
|
+
# Important declarations
|
|
106
|
+
|
|
107
|
+
a {
|
|
108
|
+
b: c !important;
|
|
109
|
+
d: e ! /* foo */ important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
==>
|
|
113
|
+
|
|
114
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
115
|
+
Declaration(PropertyName,ValueName,Important)
|
|
116
|
+
Declaration(PropertyName,ValueName,Important(Comment)))))
|
|
117
|
+
|
|
118
|
+
# Comments right after numbers
|
|
119
|
+
|
|
120
|
+
a {
|
|
121
|
+
shape-outside: circle(20em/*=*/at 50% 50%);
|
|
122
|
+
shape-outside: inset(1em, 1em, 1em, 1em);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
==>
|
|
126
|
+
|
|
127
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
128
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(NumberLiteral(Unit),Comment,ValueName,NumberLiteral(Unit),NumberLiteral(Unit)))),
|
|
129
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit),NumberLiteral(Unit)))))))
|
|
130
|
+
|
|
131
|
+
# Unfinished rule
|
|
132
|
+
|
|
133
|
+
a { foo: 2
|
|
134
|
+
|
|
135
|
+
==>
|
|
136
|
+
|
|
137
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(Declaration(PropertyName,NumberLiteral),⚠)))
|
|
138
|
+
|
|
139
|
+
# Variable names
|
|
140
|
+
|
|
141
|
+
foo {
|
|
142
|
+
--my-variable: white;
|
|
143
|
+
color: var(--my-variable);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
==>
|
|
147
|
+
|
|
148
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
149
|
+
Declaration(VariableName,ValueName),
|
|
150
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(VariableName))))))
|
|
151
|
+
|
|
152
|
+
# Trailing comma
|
|
153
|
+
|
|
154
|
+
div { color: var(--c,) }
|
|
155
|
+
|
|
156
|
+
==>
|
|
157
|
+
|
|
158
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
159
|
+
Declaration(PropertyName,CallExpression(Callee,ArgList(VariableName))))))
|
|
160
|
+
|
|
161
|
+
# Space before colon
|
|
162
|
+
|
|
163
|
+
div {
|
|
164
|
+
color : red;
|
|
165
|
+
.x :active {
|
|
166
|
+
color : blue;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
==>
|
|
171
|
+
|
|
172
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
173
|
+
Declaration(PropertyName,ValueName),
|
|
174
|
+
RuleSet(DescendantSelector(ClassSelector(ClassName),PseudoClassSelector(PseudoClassName)),Block(
|
|
175
|
+
Declaration(PropertyName,ValueName))))))
|
|
176
|
+
|
|
177
|
+
# Empty value
|
|
178
|
+
|
|
179
|
+
p {
|
|
180
|
+
--var-name: ;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
==>
|
|
184
|
+
|
|
185
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(Declaration(VariableName))))
|
|
186
|
+
|
|
187
|
+
# Bracketed values
|
|
188
|
+
|
|
189
|
+
div {
|
|
190
|
+
--myvar: [ some: value; ]
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
==>
|
|
194
|
+
|
|
195
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
196
|
+
Declaration(VariableName,BracketedValue("[", ValueName, ":", ValueName, ";", "]")))))
|
|
197
|
+
|
|
198
|
+
# Call to variables
|
|
199
|
+
|
|
200
|
+
.foo {
|
|
201
|
+
box-shadow: --shadow(blue);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
==>
|
|
205
|
+
|
|
206
|
+
StyleSheet(RuleSet(ClassSelector(ClassName),Block(
|
|
207
|
+
Declaration(PropertyName,CallExpression(VariableName,ArgList(ValueName))))))
|
|
208
|
+
|
|
209
|
+
# Pseudo Page Selector
|
|
210
|
+
|
|
211
|
+
@page :left {
|
|
212
|
+
margin: 2in 3in;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
==>
|
|
216
|
+
|
|
217
|
+
StyleSheet(AtRule(AtKeyword,PseudoQuery,Block(
|
|
218
|
+
Declaration(PropertyName,NumberLiteral(Unit),NumberLiteral(Unit)))))
|
|
219
|
+
|
|
220
|
+
# Font Feature Values
|
|
221
|
+
|
|
222
|
+
@font-feature-values Font Name {
|
|
223
|
+
font-display: swap;
|
|
224
|
+
@styleset {
|
|
225
|
+
nice-style: 12;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
==>
|
|
230
|
+
|
|
231
|
+
StyleSheet(FontFeatureStatement("font-feature-values",FontName,Block(
|
|
232
|
+
Declaration(PropertyName,ValueName),
|
|
233
|
+
AtRule(AtKeyword,Block(Declaration(PropertyName,NumberLiteral))))))
|
|
234
|
+
|
|
235
|
+
# Container with name
|
|
236
|
+
|
|
237
|
+
@container tall (height > 30rem) {}
|
|
238
|
+
|
|
239
|
+
==>
|
|
240
|
+
|
|
241
|
+
StyleSheet(AtRule(AtKeyword,KeywordQuery,ComparisonQuery(FeatureName,CompareOp,NumberLiteral(Unit)),Block))
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Universal selectors
|
|
2
|
+
|
|
3
|
+
* {}
|
|
4
|
+
div * {}
|
|
5
|
+
|
|
6
|
+
==>
|
|
7
|
+
|
|
8
|
+
StyleSheet(
|
|
9
|
+
RuleSet(UniversalSelector,Block),
|
|
10
|
+
RuleSet(DescendantSelector(TagSelector(TagName),UniversalSelector),Block))
|
|
11
|
+
|
|
12
|
+
# Type selectors
|
|
13
|
+
|
|
14
|
+
div, span {}
|
|
15
|
+
h1, h2, h3, h4 {}
|
|
16
|
+
|
|
17
|
+
==>
|
|
18
|
+
|
|
19
|
+
StyleSheet(
|
|
20
|
+
RuleSet(TagSelector(TagName),TagSelector(TagName),Block),
|
|
21
|
+
RuleSet(TagSelector(TagName),TagSelector(TagName),TagSelector(TagName),TagSelector(TagName),Block))
|
|
22
|
+
|
|
23
|
+
# Class selectors
|
|
24
|
+
|
|
25
|
+
.class-a {}
|
|
26
|
+
div.class-b, .class-c.class-d {}
|
|
27
|
+
|
|
28
|
+
==>
|
|
29
|
+
|
|
30
|
+
StyleSheet(
|
|
31
|
+
RuleSet(ClassSelector(ClassName),Block),
|
|
32
|
+
RuleSet(ClassSelector(TagSelector(TagName),ClassName),ClassSelector(ClassSelector(ClassName),ClassName),Block))
|
|
33
|
+
|
|
34
|
+
# Id selectors
|
|
35
|
+
|
|
36
|
+
#some-id, a#another-id {}
|
|
37
|
+
|
|
38
|
+
==>
|
|
39
|
+
|
|
40
|
+
StyleSheet(RuleSet(IdSelector(IdName),IdSelector(TagSelector(TagName),IdName),Block))
|
|
41
|
+
|
|
42
|
+
# Attribute selectors
|
|
43
|
+
|
|
44
|
+
[a] {}
|
|
45
|
+
[b=c] {}
|
|
46
|
+
[d~=e] {}
|
|
47
|
+
a[b] {}
|
|
48
|
+
a[href*="m" i] {}
|
|
49
|
+
|
|
50
|
+
==>
|
|
51
|
+
|
|
52
|
+
StyleSheet(
|
|
53
|
+
RuleSet(AttributeSelector(AttributeName),Block),
|
|
54
|
+
RuleSet(AttributeSelector(AttributeName,MatchOp,ValueName),Block),
|
|
55
|
+
RuleSet(AttributeSelector(AttributeName,MatchOp,ValueName),Block),
|
|
56
|
+
RuleSet(AttributeSelector(TagSelector(TagName),AttributeName),Block),
|
|
57
|
+
RuleSet(AttributeSelector(TagSelector(TagName),AttributeName,MatchOp,StringLiteral,MatchFlag),Block))
|
|
58
|
+
|
|
59
|
+
# Pseudo-class selectors
|
|
60
|
+
|
|
61
|
+
a:hover {}
|
|
62
|
+
:nth-child(2) {}
|
|
63
|
+
|
|
64
|
+
==>
|
|
65
|
+
|
|
66
|
+
StyleSheet(
|
|
67
|
+
RuleSet(PseudoClassSelector(TagSelector(TagName),":",PseudoClassName),Block),
|
|
68
|
+
RuleSet(PseudoClassSelector(":",PseudoClassName,ArgList(NumberLiteral)),Block))
|
|
69
|
+
|
|
70
|
+
# Pseudo-element selectors
|
|
71
|
+
|
|
72
|
+
a::first-line {}
|
|
73
|
+
|
|
74
|
+
==>
|
|
75
|
+
|
|
76
|
+
StyleSheet(RuleSet(PseudoClassSelector(TagSelector(TagName),"::",PseudoClassName),Block))
|
|
77
|
+
|
|
78
|
+
# Child selectors
|
|
79
|
+
|
|
80
|
+
a > b {}
|
|
81
|
+
c > d > e {}
|
|
82
|
+
|
|
83
|
+
==>
|
|
84
|
+
|
|
85
|
+
StyleSheet(
|
|
86
|
+
RuleSet(ChildSelector(TagSelector(TagName),ChildOp,TagSelector(TagName)),Block),
|
|
87
|
+
RuleSet(ChildSelector(ChildSelector(TagSelector(TagName),ChildOp,TagSelector(TagName)),ChildOp,TagSelector(TagName)),Block))
|
|
88
|
+
|
|
89
|
+
# Descendant selectors
|
|
90
|
+
|
|
91
|
+
a b {}
|
|
92
|
+
c d e {}
|
|
93
|
+
|
|
94
|
+
==>
|
|
95
|
+
|
|
96
|
+
StyleSheet(
|
|
97
|
+
RuleSet(DescendantSelector(TagSelector(TagName),TagSelector(TagName)),Block),
|
|
98
|
+
RuleSet(DescendantSelector(DescendantSelector(TagSelector(TagName),TagSelector(TagName)),TagSelector(TagName)),Block))
|
|
99
|
+
|
|
100
|
+
# Nesting selectors
|
|
101
|
+
|
|
102
|
+
a {
|
|
103
|
+
&.b {}
|
|
104
|
+
& c {}
|
|
105
|
+
c & {}
|
|
106
|
+
& > d {}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
==>
|
|
110
|
+
|
|
111
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
112
|
+
RuleSet(ClassSelector(NestingSelector,ClassName),Block),
|
|
113
|
+
RuleSet(DescendantSelector(NestingSelector,TagSelector(TagName)),Block),
|
|
114
|
+
RuleSet(DescendantSelector(TagSelector(TagName), NestingSelector),Block),
|
|
115
|
+
RuleSet(ChildSelector(NestingSelector,ChildOp,TagSelector(TagName)),Block))))
|
|
116
|
+
|
|
117
|
+
# Relative selectors
|
|
118
|
+
|
|
119
|
+
a {
|
|
120
|
+
p {}
|
|
121
|
+
> f {}
|
|
122
|
+
+ g {}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
==>
|
|
126
|
+
|
|
127
|
+
StyleSheet(RuleSet(TagSelector(TagName),Block(
|
|
128
|
+
RuleSet(TagSelector(TagName),Block),
|
|
129
|
+
RuleSet(ChildSelector(ChildOp,TagSelector(TagName)),Block),
|
|
130
|
+
RuleSet(SiblingSelector(SiblingOp,TagSelector(TagName)),Block))))
|
|
131
|
+
|
|
132
|
+
# Sibling selectors
|
|
133
|
+
|
|
134
|
+
a.b ~ c.d {}
|
|
135
|
+
.e.f + .g.h {}
|
|
136
|
+
|
|
137
|
+
==>
|
|
138
|
+
|
|
139
|
+
StyleSheet(
|
|
140
|
+
RuleSet(SiblingSelector(ClassSelector(TagSelector(TagName),ClassName),SiblingOp,ClassSelector(TagSelector(TagName),ClassName)),Block),
|
|
141
|
+
RuleSet(SiblingSelector(ClassSelector(ClassSelector(ClassName),ClassName),SiblingOp,ClassSelector(ClassSelector(ClassName),ClassName)),Block))
|
|
142
|
+
|
|
143
|
+
# The :not selector
|
|
144
|
+
|
|
145
|
+
a:not(:hover) {}
|
|
146
|
+
.b:not(c > .d) {}
|
|
147
|
+
|
|
148
|
+
==>
|
|
149
|
+
|
|
150
|
+
StyleSheet(
|
|
151
|
+
RuleSet(PseudoClassSelector(TagSelector(TagName),":",PseudoClassName,ArgList(PseudoClassSelector(":",PseudoClassName))),Block),
|
|
152
|
+
RuleSet(PseudoClassSelector(ClassSelector(ClassName),":",PseudoClassName,ArgList(ChildSelector(TagSelector(TagName),ChildOp,ClassSelector(ClassName)))),Block))
|
|
153
|
+
|
|
154
|
+
# Namespaced Selector
|
|
155
|
+
|
|
156
|
+
svg|circle { file: red; }
|
|
157
|
+
|a {}
|
|
158
|
+
*|link {}
|
|
159
|
+
|
|
160
|
+
==>
|
|
161
|
+
|
|
162
|
+
StyleSheet(
|
|
163
|
+
RuleSet(NamespacedTagSelector(NamespaceName,TagName),Block(Declaration(PropertyName,ValueName))),
|
|
164
|
+
RuleSet(NamespacedTagSelector(TagName),Block()),
|
|
165
|
+
RuleSet(NamespacedTagSelector(UniversalSelector,TagName),Block()))
|
|
166
|
+
|
|
167
|
+
# Namespaced Attribute Selector
|
|
168
|
+
|
|
169
|
+
[ns|attr] {}
|
|
170
|
+
[|attr="x"] {}
|
|
171
|
+
[*|attrs] {}
|
|
172
|
+
|
|
173
|
+
==>
|
|
174
|
+
|
|
175
|
+
StyleSheet(
|
|
176
|
+
RuleSet(AttributeSelector(NamespacedAttribute(NamespaceName,AttributeName)),Block),
|
|
177
|
+
RuleSet(AttributeSelector(NamespacedAttribute(AttributeName),MatchOp,StringLiteral),Block),
|
|
178
|
+
RuleSet(AttributeSelector(NamespacedAttribute(UniversalSelector,AttributeName)),Block))
|