Ver Fonte

Merge branch 'main' into export-typescript-worker-members

Henning Dieterichs há 2 anos atrás
pai
commit
c4e3037ed0
100 ficheiros alterados com 9681 adições e 12824 exclusões
  1. 22 3
      .azure-pipelines/publish-nightly.yml
  2. 23 3
      .azure-pipelines/publish-stable.yml
  3. 8 0
      .devcontainer/devcontainer.json
  4. 7 1
      .github/ISSUE_TEMPLATE/1_bug_report.yaml
  5. 13 0
      .github/ISSUE_TEMPLATE/2_feature_request.yaml
  6. 12 3
      .github/workflows/ci.yml
  7. 3 4
      .github/workflows/info-needed-closer.yml
  8. 0 14
      .github/workflows/publish-website.sh
  9. 45 16
      .github/workflows/website.yml
  10. 2 2
      .gitignore
  11. 3 1
      .prettierignore
  12. 31 18
      .vscode/launch.json
  13. 1 1
      .vscode/settings.json
  14. 30 0
      .vscode/tasks.json
  15. 97 2
      CHANGELOG.md
  16. 78 66
      CONTRIBUTING.md
  17. 24 19
      MAINTAINING.md
  18. 18 18
      README.md
  19. 15 20
      build/build-languages.ts
  20. 19 20
      build/build-monaco-editor.ts
  21. 53 0
      build/check-samples.ts
  22. 6 16
      build/importTypescript.ts
  23. 1 1
      build/npm/installAll.ts
  24. 1 1
      build/npm/removeAll.ts
  25. 22 9
      build/releaseMetadata.ts
  26. 10 10
      build/utils.ts
  27. 0 163
      build/website.ts
  28. 275 0
      docs/code-structure.dio.svg
  29. BIN
      docs/debugging-core.gif
  30. BIN
      docs/debugging-languages.gif
  31. BIN
      docs/launch config.png
  32. 0 0
      docs/out-folders.dio.svg
  33. 471 216
      package-lock.json
  34. 17 13
      package.json
  35. 23 23
      samples/browser-esm-vite-react/package-lock.json
  36. 2 2
      samples/browser-esm-vite-react/package.json
  37. 7 5
      samples/browser-esm-vite-react/src/components/Editor.tsx
  38. 1 1
      samples/browser-esm-webpack-small/index.js
  39. 58 58
      samples/browser-esm-webpack-typescript-react/package-lock.json
  40. 41 26
      samples/package-lock.json
  41. 2 2
      samples/package.json
  42. 6 0
      scripts/ci/env.ts
  43. 16 5
      scripts/ci/monaco-editor-core-prepare.ts
  44. 72 0
      scripts/ci/monaco-editor-prepare.ts
  45. 2 7
      scripts/ci/monaco-editor.sh
  46. 0 50
      scripts/ci/prepare-monaco-editor.ts
  47. 42 3
      scripts/lib/index.ts
  48. 1 1
      src/basic-languages/_.contribution.ts
  49. 4 1
      src/basic-languages/cpp/cpp.ts
  50. 33 0
      src/basic-languages/elixir/elixir.test.ts
  51. 10 9
      src/basic-languages/elixir/elixir.ts
  52. 59 0
      src/basic-languages/javascript/javascript.test.ts
  53. 1 0
      src/basic-languages/javascript/javascript.ts
  54. 1 1
      src/basic-languages/kotlin/kotlin.contribution.ts
  55. 24 0
      src/basic-languages/mdx/mdx.contribution.ts
  56. 171 0
      src/basic-languages/mdx/mdx.test.ts
  57. 163 0
      src/basic-languages/mdx/mdx.ts
  58. 2 0
      src/basic-languages/monaco.contribution.ts
  59. 1 0
      src/basic-languages/mysql/mysql.ts
  60. 1 1
      src/basic-languages/perl/perl.contribution.ts
  61. 4 0
      src/basic-languages/pgsql/pgsql.ts
  62. 1 1
      src/basic-languages/typescript/typescript.contribution.ts
  63. 59 0
      src/basic-languages/typescript/typescript.test.ts
  64. 2 1
      src/basic-languages/typescript/typescript.ts
  65. 24 0
      src/basic-languages/wgsl/wgsl.contribution.ts
  66. 3915 0
      src/basic-languages/wgsl/wgsl.test.ts
  67. 485 0
      src/basic-languages/wgsl/wgsl.ts
  68. 4 0
      src/basic-languages/xml/xml.contribution.ts
  69. 193 0
      src/basic-languages/yaml/yaml.test.ts
  70. 2 2
      src/basic-languages/yaml/yaml.ts
  71. 2 0
      src/language/common/lspLanguageFeatures.ts
  72. 31 29
      src/language/typescript/languageFeatures.ts
  73. 17 3
      src/language/typescript/lib/lib.index.ts
  74. 0 1
      src/language/typescript/lib/lib.ts
  75. 0 9969
      src/language/typescript/lib/typescriptServices-amd.js
  76. 246 308
      src/language/typescript/lib/typescriptServices.d.ts
  77. 2235 555
      src/language/typescript/lib/typescriptServices.js
  78. 1 1
      src/language/typescript/lib/typescriptServicesMetadata.ts
  79. 108 11
      src/language/typescript/monaco.contribution.ts
  80. 119 32
      src/language/typescript/tsMode.ts
  81. 12 11
      src/language/typescript/tsWorker.ts
  82. 5 2
      src/tsconfig.json
  83. 2 2
      test/manual/dev-setup.js
  84. 2 2
      test/smoke/amd/index.html
  85. 1 1
      test/smoke/esbuild/index.js
  86. 4 2
      test/smoke/package-esbuild.ts
  87. 2 2
      test/smoke/package-webpack.ts
  88. 14 8
      test/smoke/parcel/index.js
  89. 6 6
      test/smoke/vite/index.js
  90. 4 4
      test/unit/all.js
  91. 66 66
      webpack-plugin/package-lock.json
  92. 1 2
      webpack-plugin/package.json
  93. 7 3
      webpack-plugin/src/loaders/include.ts
  94. 51 2
      website/.gitignore
  95. 6 0
      website/.prettierrc.json
  96. 0 302
      website/all.css
  97. BIN
      website/fork.png
  98. 0 229
      website/index.html
  99. 0 258
      website/index/index.css
  100. 0 174
      website/index/index.js

+ 22 - 3
.azure-pipelines/publish-nightly.yml

@@ -23,6 +23,16 @@ resources:
       ref: main
       endpoint: Monaco
 
+parameters:
+  - name: vscodeRef
+    displayName: The VS Code commit id. When left empty, the main branched is used.
+    type: string
+    default: ''
+  - name: prereleaseVersion
+    displayName: The prerelease version. When left empty, dev-${today} is used.
+    type: string
+    default: ''
+
 extends:
   template: azure-pipelines/npm-package/pipeline.yml@templates
   parameters:
@@ -34,21 +44,30 @@ extends:
           - script: npm ci
             displayName: Install NPM dependencies
 
-          - script: yarn ts-node ./scripts/ci/prepare-monaco-editor-core nightly
+          - script: yarn ts-node ./scripts/ci/monaco-editor-core-prepare nightly
+            env:
+              VSCODE_REF: ${{ parameters.vscodeRef }}
+              PRERELEASE_VERSION: ${{ parameters.prereleaseVersion }}
+            retryCountOnTaskFailure: 5
             displayName: Setup, Build & Test monaco-editor-core
 
         tag: next
+        ghCreateTag: false
         publishPackage: true
         publishRequiresApproval: false
 
       - name: monaco-editor
-        workingDirectory: $(Build.SourcesDirectory)/release
+        workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
         testPlatforms: []
         buildSteps:
           - script: npm ci
             displayName: Install NPM dependencies
 
-          - script: yarn ts-node ./scripts/ci/prepare-monaco-editor nightly
+          - script: yarn ts-node ./scripts/ci/monaco-editor-prepare nightly
+            env:
+              VSCODE_REF: ${{ parameters.vscodeRef }}
+              PRERELEASE_VERSION: ${{ parameters.prereleaseVersion }}
+            retryCountOnTaskFailure: 5
             displayName: Setup, Build & Test monaco-editor
 
         tag: next

+ 23 - 3
.azure-pipelines/publish-stable.yml

@@ -24,6 +24,10 @@ parameters:
     displayName: 🚀 Publish Editor Core
     type: boolean
     default: false
+  - name: publishWebpackPlugin
+    displayName: 🚀 Publish Webpack Plugin
+    type: boolean
+    default: false
 
 extends:
   template: azure-pipelines/npm-package/pipeline.yml@templates
@@ -36,23 +40,39 @@ extends:
           - script: npm ci
             displayName: Install NPM dependencies
 
-          - script: yarn ts-node ./scripts/ci/prepare-monaco-editor-core stable
+          - script: yarn ts-node ./scripts/ci/monaco-editor-core-prepare stable
             displayName: Setup, Build & Test monaco-editor-core
 
         tag: latest
+        ghCreateTag: false
         publishPackage: ${{ parameters.publishMonacoEditorCore }}
         publishRequiresApproval: false
 
       - name: monaco-editor
-        workingDirectory: $(Build.SourcesDirectory)/release
+        workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
         testPlatforms: []
         buildSteps:
           - script: npm ci
             displayName: Install NPM dependencies
 
-          - script: yarn ts-node ./scripts/ci/prepare-monaco-editor stable
+          - script: yarn ts-node ./scripts/ci/monaco-editor-prepare stable
             displayName: Setup, Build & Test monaco-editor
 
         tag: latest
         publishPackage: ${{ parameters.publishMonacoEditor }}
         publishRequiresApproval: false
+
+      - name: monaco-editor-webpack-plugin
+        workingDirectory: $(Build.SourcesDirectory)/webpack-plugin
+        testPlatforms: []
+        buildSteps:
+          - script: npm ci
+            displayName: Install NPM dependencies
+
+          - script: npm run compile
+            displayName: Build plugin
+
+        tag: latest
+        ghCreateTag: false
+        publishPackage: ${{ parameters.publishWebpackPlugin }}
+        publishRequiresApproval: false

+ 8 - 0
.devcontainer/devcontainer.json

@@ -0,0 +1,8 @@
+{
+	"image": "mcr.microsoft.com/devcontainers/typescript-node",
+	"customizations": {
+		"vscode": {
+			"extensions": ["ms-vscode.js-debug-nightly"]
+		}
+	}
+}

+ 7 - 1
.github/ISSUE_TEMPLATE/1_bug_report.yaml

@@ -21,11 +21,17 @@ body:
       description: Can you reproduce the bug in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)? A minimal reproducible example will make it significantly easier for us to get this bug fixed.
       options:
         - label: Not reproducible in [the monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)
+  - type: textarea
+    id: playgroundLink
+    attributes:
+      label: Monaco Editor Playground Link
+      description: Please share the link to the [monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html) after you entered your example. In case of regressions, please also provide the first broken version.
+
   - type: textarea
     id: playgroundSourceCode
     attributes:
       label: Monaco Editor Playground Code
-      description: Please provide the code to reproduce in the [monaco editor playground](https://microsoft.github.io/monaco-editor/playground.html)
+      description: Please provide the code from the monaco editor playground example.
       render: typescript
   - type: textarea
     id: steps

+ 13 - 0
.github/ISSUE_TEMPLATE/2_feature_request.yaml

@@ -23,3 +23,16 @@ body:
     attributes:
       label: Description
       description: Please describe your feature request.
+
+  - type: textarea
+    id: relevantCodePlaygroundLink
+    attributes:
+      label: Monaco Editor Playground Link
+      description: If applicable, please share the link to a relevant [monaco editor playground sample](https://microsoft.github.io/monaco-editor/playground.html)
+
+  - type: textarea
+    id: releveantCode
+    attributes:
+      label: Monaco Editor Playground Code
+      description: If applicable, please share the code from the monaco editor playground sample.
+      render: typescript

+ 12 - 3
.github/workflows/ci.yml

@@ -18,7 +18,7 @@ jobs:
         uses: actions/cache@v2
         with:
           path: '**/node_modules'
-          key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json') }}
+          key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json', '**/package.json') }}
           restore-keys: ${{ runner.os }}-cacheNodeModules2-
 
       - name: execute `npm ci` (1)
@@ -39,7 +39,7 @@ jobs:
         run: npm run prettier-check
 
       - name: Build
-        run: npm run release
+        run: npm run build-monaco-editor
 
       - name: Run unit tests
         run: npm test
@@ -62,5 +62,14 @@ jobs:
       - name: Run smoke test
         run: npm run smoketest
 
+      - name: Install website node modules
+        working-directory: website
+        run: yarn install --frozen-lockfile
+
       - name: Build website
-        run: npm run build-website
+        working-directory: website
+        run: yarn run build
+
+      - name: Test website
+        working-directory: website
+        run: yarn test

+ 3 - 4
.github/workflows/needs-more-info-closer.yml → .github/workflows/info-needed-closer.yml

@@ -1,4 +1,4 @@
-name: Needs More Info Closer
+name: Info Needed Closer
 on:
   schedule:
     - cron: 20 12 * * * # 5:20am Redmond
@@ -18,11 +18,10 @@ jobs:
           ref: stable
       - name: Install Actions
         run: npm install --production --prefix ./actions
-      - name: Run Needs More Info Closer
+      - name: Run Info Needed Closer
         uses: ./actions/needs-more-info-closer
         with:
-          appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
-          label: needs more info
+          label: info-needed
           closeDays: 7
           additionalTeam: 'spahnke|rcjsuen'
           closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"

+ 0 - 14
.github/workflows/publish-website.sh

@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-COMMITTER_USER_NAME="$(git log --format='%an' -1)"
-COMMITTER_EMAIL="$(git log --format='%ae' -1)"
-
-cd ../monaco-editor-website
-git init
-git config user.name "${COMMITTER_USER_NAME}"
-git config user.email "${COMMITTER_EMAIL}"
-git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/microsoft/monaco-editor.git"
-git checkout -b gh-pages
-git add .
-git commit -m "Publish website"
-git push origin gh-pages --force

+ 45 - 16
.github/workflows/website.yml

@@ -2,38 +2,67 @@ name: Publish Website
 
 on:
   push:
-    branches:
-      - main
+    tags:
+      - 'v*'
   # enable users to manually trigger with workflow_dispatch
   workflow_dispatch: {}
 
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+  contents: read
+  pages: write
+  id-token: write
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+  group: 'pages'
+  cancel-in-progress: false
+
 jobs:
-  publish-website:
-    name: Publish Website
+  deploy:
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
-
-      - uses: actions/setup-node@v2
+      - name: Checkout
+        uses: actions/checkout@v3
+      - uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # pin@v2
         with:
           node-version: 16
-
       - name: Cache node modules
         id: cacheNodeModules
         uses: actions/cache@v2
         with:
           path: '**/node_modules'
-          key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
-          restore-keys: ${{ runner.os }}-cacheNodeModules-
-
-      - name: Install node modules (1)
+          key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('**/package-lock.json') }}
+          restore-keys: ${{ runner.os }}-cacheNodeModules2-
+      - name: execute `npm ci` (1)
         if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
         run: npm ci
+      - name: Build
+        run: npm run build-monaco-editor
+
+      - name: Install website node modules
+        working-directory: website
+        run: yarn install --frozen-lockfile
+
+      - name: Install most recent version of monaco-editor
+        working-directory: website
+        run: yarn add monaco-editor
 
       - name: Build website
-        run: npm run build-website
+        working-directory: website
+        run: yarn run build
 
+      - name: Setup Pages
+        uses: actions/configure-pages@v3
+      - name: Upload artifact
+        uses: actions/upload-pages-artifact@v1
+        with:
+          # Upload entire repository
+          path: './website/dist'
       - name: Deploy to GitHub Pages
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        run: ./.github/workflows/publish-website.sh
+        id: deployment
+        uses: actions/deploy-pages@v2

+ 2 - 2
.gitignore

@@ -1,8 +1,8 @@
 **/node_modules/
-**/out/
-**/release/
 **/dependencies/
 /test/manual/generated/**
 /test/smoke/vite/dist/**
 /test/smoke/parcel/dist/**
 /test/smoke/parcel/.cache/**
+**/dist/
+**/out/

+ 3 - 1
.prettierignore

@@ -1,6 +1,6 @@
 **/node_modules/
+**/dist/
 **/out/
-**/release/
 /samples/browser-esm-parcel/.parcel-cache/
 /samples/browser-esm-parcel/dist/
 /samples/browser-esm-vite-react/dist/**/*.js
@@ -13,3 +13,5 @@
 /test/manual/generated/
 /website/lib/
 /website/typedoc/monaco.d.ts
+/test/smoke/vite/dist
+/test/smoke/parcel/dist

+ 31 - 18
.vscode/launch.json

@@ -5,34 +5,47 @@
 	"version": "0.2.0",
 	"configurations": [
 		{
-			"type": "pwa-node",
+			"name": "Monaco Editor Playground",
+			"type": "chrome",
 			"request": "launch",
-			"name": "Monaco Languages Unit Tests",
-			"skipFiles": ["<node_internals>/**"],
-			"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
-			"args": ["-r", "test/unit/all.js"],
-			"outFiles": ["${workspaceFolder}/**/*.js"]
+			"url": "https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Famd-tsc",
+			"preLaunchTask": "Launch Http Server",
+			"presentation": {
+				"group": "monaco",
+				"order": 1
+			}
 		},
 		{
-			"type": "pwa-node",
+			"name": "Website",
+			"type": "chrome",
 			"request": "launch",
-			"name": "release",
-			"skipFiles": ["<node_internals>/**"],
-			"program": "${workspaceFolder}/build/release.js",
-			"args": [],
-			"cwd": "${workspaceFolder}"
+			"url": "http://localhost:8080/"
 		},
 		{
-			"type": "pwa-node",
+			// Clone VS Code and make sure the task "Launch Http Server" runs.
+			// Then the editor is build from sources.
+			// We recommend to use the workspace feature for this.
+			"name": "Monaco Editor Playground (Load From VS Code Http Server)",
+			"type": "chrome",
 			"request": "launch",
-			"name": "website",
+			"url": "https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Famd-tsc&source=http%3A%2F%2Flocalhost%3A5001%2Fout%2Fvs",
+			"preLaunchTask": "Launch Http Server",
+			"presentation": {
+				"group": "monaco",
+				"order": 1
+			}
+		},
+		{
+			"type": "node",
+			"request": "launch",
+			"name": "Monaco Languages Unit Tests",
 			"skipFiles": ["<node_internals>/**"],
-			"program": "${workspaceFolder}/build/website.js",
-			"args": [],
-			"cwd": "${workspaceFolder}"
+			"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
+			"args": ["-r", "test/unit/all.js"],
+			"outFiles": ["${workspaceFolder}/**/*.js"]
 		},
 		{
-			"type": "pwa-node",
+			"type": "node",
 			"request": "launch",
 			"name": "webpack plugin test",
 			"skipFiles": ["<node_internals>/**"],

+ 1 - 1
.vscode/settings.json

@@ -6,7 +6,7 @@
 	"files.trimTrailingWhitespace": true,
 	"search.exclude": {
 		"**/node_modules": true,
-		"**/release": true,
+		"**/dist": true,
 		"**/out": true
 	},
 	"typescript.tsdk": "./node_modules/typescript/lib",

+ 30 - 0
.vscode/tasks.json

@@ -0,0 +1,30 @@
+{
+	"version": "2.0.0",
+	"tasks": [
+		{
+			"label": "Launch Http Server",
+			"type": "shell",
+			"command": "node_modules/.bin/http-server --cors --port 5002 -a 127.0.0.1 -c-1",
+			"isBackground": true,
+			"problemMatcher": {
+				"pattern": {
+					"regexp": "does not support problems"
+				},
+				"background": {
+					"activeOnStart": true,
+					"beginsPattern": "Shutting down http-server (will never match)",
+					"endsPattern": "Starting up http-server"
+				}
+			},
+			"dependsOn": ["npm: watch"]
+		},
+		{
+			"type": "npm",
+			"script": "watch",
+			"group": "build",
+			"problemMatcher": ["$tsc-watch"],
+			"isBackground": true,
+			"label": "npm: watch"
+		}
+	]
+}

+ 97 - 2
CHANGELOG.md

@@ -1,9 +1,104 @@
 # Monaco Editor Changelog
 
-## [0.35.1]
+## [0.40.0]
+
+- Support for Glyph Margin Widgets
+- Removes `getDiffLineInformationForOriginal` and `getDiffLineInformationForModified` from `IDiffEditor`
+- `createTrustedTypesPolicy` is optional now
+- New option `IModelDecorationOptions.shouldFillLineOnLineBreak`
+- New option `EditorOptions.readOnlyMessage``
+
+## [0.39.0]
+
+- New method `Environment.createTrustedTypesPolicy` to override trusted types handling.
+- Bugfixes
+
+Contributions to `monaco-editor`:
+
+- [@dlitsman (Dmitry Litsman)](https://github.com/dlitsman): Extend the "Rendering Glyphs In The Margin" example to include a transparent color note. [PR #3945](https://github.com/microsoft/monaco-editor/pull/3945)
+- [@dneto0 (David Neto)](https://github.com/dneto0): Avoid a hack in the WGSL lexer [PR #3887](https://github.com/microsoft/monaco-editor/pull/3887)
+- [@spahnke (Sebastian Pahnke)](https://github.com/spahnke)
+  - [JS, TS] Add Monarch support for private identifiers [PR #3919](https://github.com/microsoft/monaco-editor/pull/3919)
+  - [JS] Add static keyword [PR #3922](https://github.com/microsoft/monaco-editor/pull/3922)
+- [@titouanmathis (Titouan Mathis)](https://github.com/titouanmathis): [Webpack Plugin] Fix CJS being injected in ESM files [PR #3933](https://github.com/microsoft/monaco-editor/pull/3933)
+
+## [0.38.0]
+
+- `diffAlgorithm` values changed: `smart` -> `legacy`, `experimental` -> `advanced`
+- New `registerEditorOpener` API
+- New property `IViewZone.showInHiddenAreas` to show view zones in hidden areas
+- New properties `InlineCompletions.suppressSuggestions` and `InlineCompletions.enableForwardStability`
+- Bugfixes
+
+Contributions to `monaco-editor`:
+
+- [@dneto0 (David Neto)](https://github.com/dneto0): Add WebGPU Shading Language tokenizer, with tests [PR #3884](https://github.com/microsoft/monaco-editor/pull/3884)
+- [@kisstkondoros (Tamas Kiss)](https://github.com/kisstkondoros): Fix reference error in convert method of OutlineAdapter [PR #3924](https://github.com/microsoft/monaco-editor/pull/3924)
+- [@tamayika](https://github.com/tamayika): Change moduleResolution to node16 and adopt TS 5.0 [PR #3860](https://github.com/microsoft/monaco-editor/pull/3860)
+
+## [0.37.1]
+
+- Fixes Inline Completions feature
+
+## [0.37.0]
+
+- New `registerLinkOpener` API
+- New `onLanguageEncountered` event for when a language is encountered during tokenization.
+- Updated TypeScript to 5.0
+- New required field `canFormatMultipleRanges` on `DocumentRangeFormattingEditProvider`
+- Bugfixes
+
+Contributions to `monaco-editor`:
+
+- [@danboo (Dan Boorstein)](https://github.com/danboo): add perl module (.pm) extension [PR #3258](https://github.com/microsoft/monaco-editor/pull/3258)
+- [@miloush (Jan Kučera)](https://github.com/miloush): Include .xsd and .xslt as an XML extension [PR #3866](https://github.com/microsoft/monaco-editor/pull/3866)
+- [@nnnnoel (Noel Kim (김민혁))](https://github.com/nnnnoel): Add CommonJS, ESM extension for TS [PR #3264](https://github.com/microsoft/monaco-editor/pull/3264)
+- [@PmcFizz (Fizz)](https://github.com/PmcFizz): opt example [PR #3726](https://github.com/microsoft/monaco-editor/pull/3726)
+- [@tamayika](https://github.com/tamayika)
+  - Fix playground samples type errors and add CI test [PR #3722](https://github.com/microsoft/monaco-editor/pull/3722)
+  - Add custom keybinding example [PR #3848](https://github.com/microsoft/monaco-editor/pull/3848)
+- [@yuri1969 (yuri)](https://github.com/yuri1969): Various YAML improvements [PR #3864](https://github.com/microsoft/monaco-editor/pull/3864)
+
+## [0.36.1]
+
+- Marks unneeded dependencies as dev dependencies.
+
+## [0.36.0]
+
+- Maintenance release
+
+## [0.35.0]
 
 - Adds sticky scrolling
+- Support for custom diff algorithms
+
+### Breaking Changes
+
 - Renamed the option `enableDropIntoEditor` to `dropIntoEditor`
+- Changed `IContentWidgetPosition.range: Range` to `IContentWidgetPosition.secondaryPosition: Position`
+- `renderFinalNewline` config: is now of type `'on' | 'off' | 'dimmed'` (was `boolean`).
+- `cursorSmoothCaretAnimation` config: is now of type `'off' | 'explicit' | 'on'` (was `boolean`)
+
+Contributions to `monaco-editor`:
+
+- [@andrewimcclement](https://github.com/andrewimcclement): Add .props & .targets as XML extensions [PR #3510](https://github.com/microsoft/monaco-editor/pull/3510)
+- [@DetachHead](https://github.com/DetachHead): add `satisfies` keyword to typescript [PR #3337](https://github.com/microsoft/monaco-editor/pull/3337)
+- [@jeremy-rifkin (Jeremy Rifkin)](https://github.com/jeremy-rifkin): Add AVX 512 types to C++ syntax highlighting [PR #3286](https://github.com/microsoft/monaco-editor/pull/3286)
+- [@joecarl (José Carlos)](https://github.com/joecarl): Add setModeConfiguration for monaco.languages.typescript.[typescript|javascript]Defaults [PR #3489](https://github.com/microsoft/monaco-editor/pull/3489)
+- [@jonatanklosko (Jonatan Kłosko)](https://github.com/jonatanklosko): Update Elixir tokenizer [PR #3453](https://github.com/microsoft/monaco-editor/pull/3453)
+- [@JoyceZhu (Joyce Zhu)](https://github.com/JoyceZhu): Update import path for `browser-esm-webpack-small` [PR #3402](https://github.com/microsoft/monaco-editor/pull/3402)
+- [@Jozebel11 (Joseph Hardwicke)](https://github.com/Jozebel11): Add position styling to playground container to equal 'relative' [PR #3446](https://github.com/microsoft/monaco-editor/pull/3446)
+- [@kirjs (Kirill Cherkashin)](https://github.com/kirjs): Fix broken link in the changelog [PR #3382](https://github.com/microsoft/monaco-editor/pull/3382)
+- [@LeoDog896 (Tristan F.)](https://github.com/LeoDog896)
+  - Ignore dist from vite/parcel in prettier [PR #3466](https://github.com/microsoft/monaco-editor/pull/3466)
+  - Add .kts as a file extension [PR #3467](https://github.com/microsoft/monaco-editor/pull/3467)
+- [@MasterOdin (Matthew Peveler)](https://github.com/MasterOdin): Add new pgsql 15 functions [PR #3363](https://github.com/microsoft/monaco-editor/pull/3363)
+- [@mofux (Thomas Zilz)](https://github.com/mofux): Resolve URIs with special characters correctly [PR #3392](https://github.com/microsoft/monaco-editor/pull/3392)
+- [@nnnnoel (Noel Kim (김민혁))](https://github.com/nnnnoel): fix(mysql/tokenizer): Fix single quoted string escape [PR #3232](https://github.com/microsoft/monaco-editor/pull/3232)
+- [@rcjsuen (Remy Suen)](https://github.com/rcjsuen): Fix the color provider's columns [PR #3348](https://github.com/microsoft/monaco-editor/pull/3348)
+- [@RubenRBS (Rubén Rincón Blanco)](https://github.com/RubenRBS): Recognize \0 as an escape sequence [PR #3443](https://github.com/microsoft/monaco-editor/pull/3443)
+- [@sekedus (Sekedus)](https://github.com/sekedus): add homepage url [PR #3497](https://github.com/microsoft/monaco-editor/pull/3497)
+- [@tr3ysmith (Trey Smith)](https://github.com/tr3ysmith): Fix possible duplicate of editors in vite sample [PR #3390](https://github.com/microsoft/monaco-editor/pull/3390)
 
 ## [0.34.1]
 
@@ -501,7 +596,7 @@ Contributions to `monaco-typescript`:
 - Many improvements in `monaco-typescript`: support for "deprecated" tags, API to participate in the web worker, improved lib.d.ts resolving.
 - New tokenization support for: Julia, Scala, Lexon, Terraform HCL, Dart, Systemverilog.
 - New semantic tokens provider [sample on the playground](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-semantic-tokens-provider-example).
-- New [shadow dom sample](https://github.com/microsoft/monaco-editor-samples/tree/master/browser-amd-shadow-dom)
+- New [shadow dom sample](https://github.com/microsoft/monaco-editor/tree/main/samples/browser-amd-shadow-dom)
 - New `overflowWidgetsDomNode` constructor option to pass in a parent for overflowing widgets.
 - New `minimap.size` option: `proportional`, `fill`, `fit`.
 - New `OnTypeRename` provider and option `renameOnType`.

+ 78 - 66
CONTRIBUTING.md

@@ -1,15 +1,17 @@
-# Contributing
+# Contributing / Dev Setup
 
-Checkout [MAINTAINING.md](./MAINTAINING.md) for common maintaining tasks.
+## Source Code Structure
 
-## A brief explanation on the source code structure
+It is important to understand that the Monaco Editor _Core_ is built directly from the [VS Code source code](https://github.com/microsoft/vscode).
+The Monaco Editor then enhances the Monaco Editor Core with some basic language features.
 
-This repository contains source code only for Monaco Editor Languages, the core editor source lives in the [vscode repository](https://github.com/microsoft/vscode).
+This diagram describes the relationships between the repositories and the npm packages:
 
-| repository                                                  | npm module                                                             | explanation                                                             |
-| ----------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
-| [vscode](https://github.com/microsoft/vscode)               | [monaco-editor-core](https://www.npmjs.com/package/monaco-editor-core) | editor core functionality (language agnostic) is shipped out of vscode. |
-| [monaco-editor](https://github.com/microsoft/monaco-editor) | [monaco-editor](https://www.npmjs.com/package/monaco-editor)           | the Monaco Editor.                                                      |
+![](./docs/code-structure.dio.svg)
+
+By default, `monaco-editor-core` is installed from npm (through the initial `npm install`), so you can work on Monaco Editor language features without having to build the core editor / VS Code.
+The nightly builds build a fresh version of `monaco-editor-core` from the `main` branch of VS Code.
+For a stable release, the commit specified in `vscodeRef` in [package.json](./package.json) specifies the commit of VS Code that is used to build `monaco-editor-core`.
 
 ## Contributing a new tokenizer / a new language
 
@@ -25,89 +27,99 @@ Please understand that we only bundle languages with the monaco editor that have
 import './{myLang}/{myLang}.contribution';
 ```
 
-## Running the editor from source
+## Debugging / Developing The Core Editor
 
-You need to have all the build setup of VS Code to be able to build the Monaco Editor.
+To debug core editor issues.
 
-- Install all the [prerequisites](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)
+This can be done directly from the VS Code repository and does not involve the monaco editor repository.
 
-```bash
-# clone vscode-loc repository for localized string resources
-/src> git clone https://github.com/microsoft/vscode-loc
-# clone VS Code repository
-/src> git clone https://github.com/microsoft/vscode
-/src> cd vscode
-# install npm deps for vscode
-/src/vscode> yarn
-# start the compiler in the background
-/src/vscode> yarn watch
-```
+- Clone the [VS Code repository](https://github.com/microsoft/vscode): `git clone https://github.com/microsoft/vscode`
+- Open the repository in VS Code: `code vscode`
+- Run `yarn install`
+- Select and run the launch configuration "Monaco Editor Playground" (this might take a while, as it compiles the sources):
 
-- For the monaco editor test pages:
+  ![](./docs/launch%20config.png)
 
-```bash
-# clone monaco-editor (note the folders must be siblings!)
-/src> git clone https://github.com/microsoft/monaco-editor
+- Now you can set breakpoints and change the source code
 
-# install npm deps for monaco-editor
-/src/monaco-editor> npm install .
+  ![](./docs/debugging-core.gif)
 
-# compile and bundle all plugins
-/src/monaco-editor> npm run release
+- Optionally, you can build `monaco-editor-core` and link it to the monaco editor repository:
 
-# start a local http server in the background
-/src/monaco-editor> npm run simpleserver
-```
+  ```bash
+  # builds out-monaco-editor-core
+  > yarn gulp editor-distro
 
-Open [http://localhost:8080/monaco-editor/test/manual/?editor=src](http://localhost:8080/monaco-editor/test/manual/?editor=src) to run.
+  > cd out-monaco-editor-core
+  > npm link
+  > cd ../path/to/monaco-editor
 
-## Running the editor tests
+  # symlinks the monaco-editor-core package to the out-monaco-editor-core folder we just built
+  > npm link monaco-editor-core
+  ```
 
-```bash
-# create a local release
-/src/monaco-editor> npm run release
+## Debugging / Developing Language Support
 
-# run unit tests
-/src/monaco-editor> npm run test
+To debug bundled languages, such as JSON, HTML or TypeScript/JavaScript.
 
-# compile the webpack plugin
-/src/monaco-editor> npm run compile --prefix webpack-plugin
+- Clone the [monaco editor repository](https://github.com/microsoft/monaco-editor): `git clone https://github.com/microsoft/monaco-editor`
+- Open the repository in VS Code: `code monaco-editor`
+- Run `npm install`
+- Select and run the launch configuration "Monaco Editor Playground" (this might take a while, as it compiles the sources):
 
-# package using the webpack plugin
-/src/monaco-editor> npm run package-for-smoketest-webpack
+  ![](./docs/launch%20config.png)
 
-# package using esbuild
-/src/monaco-editor> npm run package-for-smoketest-esbuild
+- Now you can set breakpoints and change the source code
 
-# package using vite
-/src/monaco-editor> npm run package-for-smoketest-vite
+  ![](./docs/debugging-languages.gif)
 
-# package using parcel
-/src/monaco-editor> npm run package-for-smoketest-parcel --prefix test/smoke/parcel
+- Optionally, you can build `monaco-editor` and link it if you want to test your changes in a real application:
 
-# run the smoketest
-/src/monaco-editor> npm run smoketest-debug
-```
+  ```bash
+  # builds out/monaco-editor
+  > npm run build-monaco-editor
 
-> Tip: All folders must be cloned as siblings.
+  > cd out/monaco-editor
+  > npm link
 
-> Tip: When running the test pages, use the control panel in the top right corner to switch between running from source, running from npm or running from the local release:
-> ![image](https://cloud.githubusercontent.com/assets/5047891/19599080/eb0d7622-979e-11e6-96ce-dde98cd95dc1.png)
+  > cd ../path/to/my-app
+  > npm link monaco-editor
+  ```
 
-## Running the website locally
+## Running the editor tests
 
-> Note: The website is published automatically when pushing to the `master` branch.
+```bash
+> npm run build-monaco-editor
+> npm run test
+> npm run compile --prefix webpack-plugin
+
+> npm run package-for-smoketest-webpack
+> npm run package-for-smoketest-esbuild
+> npm run package-for-smoketest-vite
+> npm run package-for-smoketest-parcel --prefix test/smoke/parcel
+> npm run smoketest-debug
+```
+
+## Running the website locally
 
 ```bash
-# create a local release
-/src/monaco-editor> npm run release
+> npm install
+> npm run build-monaco-editor
 
-# build the website
-/src/monaco-editor> npm run build-website
+> cd website
+> yarn install
+> yarn typedoc
+> yarn dev
+```
 
-# start local webserver
-/src/monaco-editor> npm run simpleserver
+Now webpack logs the path to the website.
 
-# open http://localhost:8080/monaco-editor-website/
+## Out Folders
 
-```
+This diagram describes the output folders of the build process:
+
+![](./docs/out-folders.dio.svg)
+
+## Maintaining
+
+Checkout [MAINTAINING.md](./MAINTAINING.md) for common maintaining tasks (for maintainers only).

+ 24 - 19
MAINTAINING.md

@@ -1,29 +1,27 @@
 # Maintaining
 
-(For maintainers)
+(For maintainers only)
 
-- [Inbox Queue](https://github.com/microsoft/monaco-editor/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Aquestion+-label%3Aupstream+-label%3A%22help+wanted%22+-label%3A%22info-needed%22+-label%3A%22as-designed%22+)
+Make sure every unassigned issue is labeled properly:
 
-## Updating TypeScript
+- [Inbox Queue](https://github.com/microsoft/monaco-editor/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Aupstream+-label%3A%22info-needed%22++-label%3Abug+)
 
-- change typescript's version in `package.json`.
-- execute `npm install .`
-- execute `npm run import-typescript`
-- adopt new APIs
-
-## Shipping a new monaco-editor npm module
+## Publishing a stable build monaco-editor build
 
-- update `package.json` and bump `"version"` as necessary
-- update `package.json` and edit `"vscode"` to point to the vscode repo commit that should be shipped at `monaco-editor-core` (both `monaco-editor-core` and `monaco-editor` will be published under the same version defined in `package.json`).
-- write entry in `CHANGELOG.md`
-  - API Changes / Breaking Changes / New and noteworthy
-  - Thank you ([use this tool](https://vscode-tools.azurewebsites.net/acknowledgement/))
-- trigger a build using [`Publish to npm`](https://github.com/microsoft/monaco-editor/actions/workflows/publish.yml) and type false when asked "is nightly?"
-- if the publish succeeded, run `git tag 0.x.y` and `git push origin 0.x.y`
-- edit `package.json` and update the `"monaco-editor-core"` dev dependency.
-- run `npm install`
+- Make sure there exists a nightly build from the VS Code commit the stable build should be built from
+- [Compare Last Stable With Nightly](https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0-dev.20230704#XQAAAAJWBgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw_SM66BuzMt6m3zM8Thvb-XSMR_Da8IdBq3FOgly-7-xuaHSi_yUg58ZO9Mr-RKT7GyHzHoU8B9N7P-uTzmCdhT2Vv-4gNRbWSMQCUPrfmzFCkSH_WR2Vc8LGx2m0uRSFiJu82B1mS0RM-eriU9PTOqAgBrlPUMTU44VrHyVOqgs5BFrUuUHwGDzUHxeNuUk-kg2u70awQLQ83wD4o2EbSefqfIWkk2Yi0mnUS903tLA4V17MD_6OHIRArunMPL6E14ZCW0_Aql21F62Fmz--i_pNbqBIpSlBbZl6LzA1HzNsoDH7i2rn1qAw55L1MjwOU4QQMCJfffmJznAbGoZWkXK91OPYlOGNHNGG-MPUFsY5JSjLfvCWOvXypW9ZVkBZMo1qUbtE135CLqbaBiw52f3eOPBTru3IL_wT__ciAFI5NDiVOeN8V9zqkzbwiFNeQyZcjxmrDLjYTPJpao0dG61Um0w4FpVud8p77bjoAdEfG8JNO97W4cawj0HvMfvcZS81P7IsijZqA7KyVsdq79iCJQuMO31aS86cM4GTNT0TvdI7p62uiEmm9X6ZjF8oSLxW87Vt0oYAZ5wBePqdN6FwNO6BWACt2Ep9i5Q6h-mOy7_JWOiPTOH0Zz3v6SaNhjxJwZAqNG3FqvRTgLg-au-pfa8PD0No3U15UyWeqrVXSthGFghLJ16ppEwFCqFfQ6Vr0leZtSZXyk41-t5ZKMG-KQjzq1XE2PnuyOz60nV4GaYvGlMHrXz-XrEqb2kwNf_pBee0)
+  - Update [package.json](./package.json)
+    - set `version` to next stable
+    - set `vscodeRef` to _vscodeCommitId_
+    - update `devDependencies.monaco-editor-core` to _version_
+  - Run `npm install` to update lockfile
+  - Update [CHANGELOG.md](./CHANGELOG.md)
+    - API Changes / Breaking Changes / New and noteworthy
+    - Thank you ([use this tool](https://tools.code.visualstudio.com/acknowledgement))
+  - Commit
+  - [Trigger build](https://dev.azure.com/monacotools/Monaco/_build?definitionId=416)
 
-#### 8. Publish new webpack plugin
+#### Publish new webpack plugin
 
 - **TBD**
 - https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin
@@ -40,3 +38,10 @@
   - use `npm version major`
   - publish using `npm publish`
 - remember to push tags upstream
+
+## Updating TypeScript
+
+- change typescript's version in `package.json`.
+- execute `npm install .`
+- execute `npm run import-typescript`
+- adopt new APIs

+ 18 - 18
README.md

@@ -1,29 +1,32 @@
 # Monaco Editor
 
-[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3)
+[![Versions](https://img.shields.io/npm/v/monaco-editor)](https://www.npmjs.com/package/monaco-editor)
+[![Versions](https://img.shields.io/npm/v/monaco-editor/next)](https://www.npmjs.com/package/monaco-editor)
+[![Feature Requests](https://img.shields.io/github/issues/microsoft/monaco-editor/feature-request.svg)](https://github.com/microsoft/monaco-editor/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
+[![Bugs](https://img.shields.io/github/issues/microsoft/monaco-editor/bug.svg)](https://github.com/microsoft/monaco-editor/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3Abug)
 
-The Monaco Editor is the code editor which powers [VS Code](https://github.com/microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved).
-
-Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module.
+The Monaco Editor is the fully featured code editor from [VS Code](https://github.com/microsoft/vscode). Check out the [VS Code docs](https://code.visualstudio.com/docs/editor/editingevolved) to see some of the supported features.
 
 ![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
 
 ## Try it out
 
-Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html).
+Try out the editor and see various examples [in our interactive playground](https://microsoft.github.io/monaco-editor/playground.html).
+
+The playground is the best way to learn about how to use the editor, which features is supports, to try out different versions and to create minimal reproducible examples for bug reports.
 
 ## Installing
 
 ```
-$ npm install monaco-editor
+> npm install monaco-editor
 ```
 
 You will get:
 
-- inside `esm`: ESM version of the editor (compatible with e.g. webpack)
-- inside `dev`: AMD bundled, not minified
-- inside `min`: AMD bundled, and minified
-- inside `min-maps`: source maps for `min`
+- inside `/esm`: ESM version of the editor (compatible with e.g. webpack)
+- inside `/dev`: AMD bundled, not minified
+- inside `/min`: AMD bundled, and minified
+- inside `/min-maps`: source maps for `min`
 - `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
 
 It is recommended to develop against the `dev` version, and in production to use the `min` version.
@@ -34,14 +37,14 @@ It is recommended to develop against the `dev` version, and in production to use
   - [Integrate the AMD version](./docs/integrate-amd.md).
   - [Integrate the ESM version](./docs/integrate-esm.md)
 - Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
-- Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts).
+- Explore the [API docs](https://microsoft.github.io/monaco-editor/docs.html) or read them straight from [`monaco.d.ts`](https://microsoft.github.io/monaco-editor/node_modules/monaco-editor/monaco.d.ts).
 - Read [this guide](https://github.com/microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
 - Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
 - Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
 
 ## Issues
 
-Create [issues](https://github.com/microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates.
+Create [issues](https://github.com/microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Please search for existing issues to avoid duplicates.
 
 ## FAQ
 
@@ -79,13 +82,10 @@ No.
 
 - Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
 
-❓ **What about IE 11 support?**
-
-- The Monaco Editor no longer supports IE 11. The last version that was tested on IE 11 is `0.18.1`.
-
-## Development setup
+## Contributing / Local Development
 
-Please see [CONTRIBUTING](./CONTRIBUTING.md)
+We are welcoming contributions from the community!
+Please see [CONTRIBUTING](./CONTRIBUTING.md) for details how you can contribute effectively, how you can run the editor from sources and how you can debug and fix issues.
 
 ## Code of Conduct
 

+ 15 - 20
build/build.ts → build/build-languages.ts

@@ -4,33 +4,33 @@
  *--------------------------------------------------------------------------------------------*/
 
 import glob from 'glob';
-import { tsc, dts, buildESM, buildAMD } from './utils';
+import { runTsc, massageAndCopyDts, buildESM, buildAMD } from './utils';
 import { copyFile, removeDir } from './fs';
 
-removeDir(`out`);
+removeDir(`out/languages`);
 
-tsc(`src/tsconfig.json`);
+runTsc(`src/tsconfig.json`);
 
 //#region Type Defintion
 
-dts(
-	`out/amd/language/css/monaco.contribution.d.ts`,
-	`out/release/css.d.ts`,
+massageAndCopyDts(
+	`out/languages/amd-tsc/language/css/monaco.contribution.d.ts`,
+	`out/languages/bundled/css.d.ts`,
 	'monaco.languages.css'
 );
-dts(
-	`out/amd/language/html/monaco.contribution.d.ts`,
-	`out/release/html.d.ts`,
+massageAndCopyDts(
+	`out/languages/amd-tsc/language/html/monaco.contribution.d.ts`,
+	`out/languages/bundled/html.d.ts`,
 	'monaco.languages.html'
 );
-dts(
-	`out/amd/language/json/monaco.contribution.d.ts`,
-	`out/release/json.d.ts`,
+massageAndCopyDts(
+	`out/languages/amd-tsc/language/json/monaco.contribution.d.ts`,
+	`out/languages/bundled/json.d.ts`,
 	'monaco.languages.json'
 );
-dts(
-	`out/amd/language/typescript/monaco.contribution.d.ts`,
-	`out/release/typescript.d.ts`,
+massageAndCopyDts(
+	`out/languages/amd-tsc/language/typescript/monaco.contribution.d.ts`,
+	`out/languages/bundled/typescript.d.ts`,
 	'monaco.languages.typescript'
 );
 
@@ -131,11 +131,6 @@ buildAMD({
 
 //#region typescript
 
-copyFile(
-	`src/language/typescript/lib/typescriptServices-amd.js`,
-	`out/amd/language/typescript/lib/typescriptServices.js`
-);
-
 buildESM({
 	base: 'language/typescript',
 	entryPoints: [

+ 19 - 20
build/release.ts → build/build-monaco-editor.ts

@@ -10,7 +10,7 @@ import { removeDir } from '../build/fs';
 import ts = require('typescript');
 import { generateMetadata } from './releaseMetadata';
 
-removeDir(`release`);
+removeDir(`out/monaco-editor`);
 
 // dev folder
 AMD_releaseOne('dev');
@@ -39,7 +39,7 @@ generateMetadata();
 	delete json.scripts['postinstall'];
 
 	packageJSON.contents = Buffer.from(JSON.stringify(json, null, '  '));
-	writeFiles([packageJSON], `release`);
+	writeFiles([packageJSON], `out/monaco-editor`);
 })();
 
 (() => {
@@ -59,7 +59,7 @@ generateMetadata();
 		})
 	);
 
-	writeFiles(otherFiles, `release`);
+	writeFiles(otherFiles, `out/monaco-editor`);
 })();
 
 /**
@@ -70,13 +70,13 @@ function AMD_releaseOne(type: 'dev' | 'min') {
 		base: `node_modules/monaco-editor-core/${type}`
 	});
 	AMD_addPluginContribs(type, coreFiles);
-	writeFiles(coreFiles, `release/${type}`);
+	writeFiles(coreFiles, `out/monaco-editor/${type}`);
 
-	const pluginFiles = readFiles(`out/release/${type}/**/*`, {
-		base: `out/release/${type}`,
+	const pluginFiles = readFiles(`out/languages/bundled/amd-${type}/**/*`, {
+		base: `out/languages/bundled/amd-${type}`,
 		ignore: ['**/monaco.contribution.js']
 	});
-	writeFiles(pluginFiles, `release/${type}`);
+	writeFiles(pluginFiles, `out/monaco-editor/${type}`);
 }
 
 /**
@@ -96,8 +96,8 @@ function AMD_addPluginContribs(type: 'dev' | 'min', files: IFile[]) {
 		// Rename the AMD module 'vs/editor/editor.main' to 'vs/editor/edcore.main'
 		contents = contents.replace(/"vs\/editor\/editor\.main\"/, '"vs/editor/edcore.main"');
 
-		const pluginFiles = readFiles(`out/release/${type}/**/monaco.contribution.js`, {
-			base: `out/release/${type}`
+		const pluginFiles = readFiles(`out/languages/bundled/amd-${type}/**/monaco.contribution.js`, {
+			base: `out/languages/bundled/amd-${type}`
 		});
 
 		const extraContent = pluginFiles.map((file) => {
@@ -141,7 +141,7 @@ function ESM_release() {
 	});
 	ESM_addImportSuffix(coreFiles);
 	ESM_addPluginContribs(coreFiles);
-	writeFiles(coreFiles, `release/esm`);
+	writeFiles(coreFiles, `out/monaco-editor/esm`);
 
 	ESM_releasePlugins();
 }
@@ -152,7 +152,7 @@ function ESM_release() {
  * Rewrites imports for 'monaco-editor-core/**'
  */
 function ESM_releasePlugins() {
-	const files = readFiles(`out/release/esm/**/*`, { base: 'out/release/esm/' });
+	const files = readFiles(`out/languages/bundled/esm/**/*`, { base: 'out/languages/bundled/esm/' });
 
 	for (const file of files) {
 		if (!/(\.js$)|(\.ts$)/.test(file.path)) {
@@ -210,7 +210,7 @@ function ESM_releasePlugins() {
 	}
 
 	ESM_addImportSuffix(files);
-	writeFiles(files, `release/esm`);
+	writeFiles(files, `out/monaco-editor/esm`);
 }
 
 /**
@@ -256,8 +256,8 @@ function ESM_addPluginContribs(files: IFile[]) {
 
 	const mainFileDestPath = 'vs/editor/editor.main.js';
 
-	const mainFileImports = readFiles(`out/release/esm/**/monaco.contribution.js`, {
-		base: `out/release/esm`
+	const mainFileImports = readFiles(`out/languages/bundled/esm/**/monaco.contribution.js`, {
+		base: `out/languages/bundled/esm`
 	}).map((file) => {
 		let relativePath = path
 			.relative(path.dirname(mainFileDestPath), file.path)
@@ -292,8 +292,8 @@ function releaseDTS() {
 
 	let contents = monacodts.contents.toString();
 
-	const extraContent = readFiles('out/release/*.d.ts', {
-		base: 'out/release/'
+	const extraContent = readFiles('out/languages/bundled/*.d.ts', {
+		base: 'out/languages/bundled/'
 	}).map((file) => {
 		return file.contents.toString().replace(/\/\/\/ <reference.*\n/m, '');
 	});
@@ -321,10 +321,9 @@ function releaseDTS() {
 		contents: Buffer.from(toExternalDTS(contents))
 	};
 
-	writeFiles([monacodts, editorapidts], `release`);
+	writeFiles([monacodts, editorapidts], `out/monaco-editor`);
 
-	fs.writeFileSync('website/playground/monaco.d.ts.txt', contents);
-	fs.writeFileSync('website/typedoc/monaco.d.ts', contents);
+	// fs.writeFileSync('website/typedoc/monaco.d.ts', contents);
 }
 
 /**
@@ -423,5 +422,5 @@ function releaseThirdPartyNotices() {
 	contents += '\n' + thirdPartyNoticeContent;
 	tpn.contents = Buffer.from(contents);
 
-	writeFiles([tpn], `release`);
+	writeFiles([tpn], `out/monaco-editor`);
 }

+ 53 - 0
build/check-samples.ts

@@ -0,0 +1,53 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import * as fs from 'fs';
+import * as glob from 'glob';
+import * as path from 'path';
+import { REPO_ROOT } from './utils';
+
+checkEveryMonacoLanguageHasASample();
+
+function checkEveryMonacoLanguageHasASample() {
+	let languages = glob
+		.sync('src/basic-languages/*/*.contribution.ts', { cwd: REPO_ROOT })
+		.map((f) => path.dirname(f))
+		.map((f) => f.substring('src/basic-languages/'.length));
+	languages.push('css');
+	languages.push('html');
+	languages.push('json');
+	languages.push('typescript');
+
+	// some languages have a different id than their folder
+	languages = languages.map((l) => {
+		switch (l) {
+			case 'coffee':
+				return 'coffeescript';
+			case 'protobuf':
+				return 'proto';
+			case 'solidity':
+				return 'sol';
+			case 'sophia':
+				return 'aes';
+			default:
+				return l;
+		}
+	});
+
+	let fail = false;
+	for (const language of languages) {
+		const expectedSamplePath = path.join(
+			REPO_ROOT,
+			`website/src/website/data/home-samples/sample.${language}.txt`
+		);
+		if (!fs.existsSync(expectedSamplePath)) {
+			console.error(`Missing sample for ${language} at ${expectedSamplePath}`);
+			fail = true;
+		}
+	}
+	if (fail) {
+		process.exit(1);
+	}
+}

+ 6 - 16
build/importTypescript.ts

@@ -37,7 +37,12 @@ export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
 
 	let tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescript.js')).toString();
 
-	// The output from this build will only be accessible via AMD or ESM; rather than removing
+	tsServices = tsServices.replace(
+		'const path = matchedStar ? subst.replace("*", matchedStar) : subst;',
+		'const path = matchedStar ? subst.replace("*", matchedStar) : subst; // CodeQL [SM02383] This is a false positive, the code is from the TypeScript compiler'
+	);
+
+	// The output from this build will only be accessible via ESM; rather than removing
 	// references to require/module, define them as dummy variables that bundlers will ignore.
 	// The TS code can figure out that it's not running under Node even with these defined.
 	tsServices =
@@ -48,21 +53,6 @@ var module = { exports: {} };
 /* END MONACOCHANGE */
 ` + tsServices;
 
-	const tsServices_amd =
-		generatedNote +
-		tsServices +
-		`
-// MONACOCHANGE
-// Defining the entire module name because r.js has an issue and cannot bundle this file
-// correctly with an anonymous define call
-define("vs/language/typescript/lib/typescriptServices", [], function() { return ts; });
-// END MONACOCHANGE
-`;
-	fs.writeFileSync(
-		path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices-amd.js'),
-		stripSourceMaps(tsServices_amd)
-	);
-
 	const tsServices_esm =
 		generatedNote +
 		tsServices +

+ 1 - 1
build/npm/installAll.ts

@@ -12,7 +12,7 @@ import { REPO_ROOT } from '../utils';
 
 const files = glob.sync('**/package.json', {
 	cwd: REPO_ROOT,
-	ignore: ['**/node_modules/**', '**/out/**', '**/release/**']
+	ignore: ['**/node_modules/**', '**/dist/**', '**/out/**']
 });
 
 for (const file of files) {

+ 1 - 1
build/npm/removeAll.ts

@@ -10,7 +10,7 @@ import { REPO_ROOT } from '../utils';
 
 const files = glob.sync('**/package-lock.json', {
 	cwd: REPO_ROOT,
-	ignore: ['**/node_modules/**', '**/out/**', '**/release/**']
+	ignore: ['**/node_modules/**', '**/out/**']
 });
 
 for (const file of files) {

+ 22 - 9
build/releaseMetadata.ts

@@ -26,7 +26,7 @@ const customFeatureLabels = {
 function getBasicLanguages(): Promise<{ label: string; entry: string }[]> {
 	return new Promise((resolve, reject) => {
 		glob(
-			'./release/esm/vs/basic-languages/*/*.contribution.js',
+			'./out/monaco-editor/esm/vs/basic-languages/*/*.contribution.js',
 			{ cwd: path.dirname(__dirname) },
 			(err, files) => {
 				if (err) {
@@ -36,7 +36,7 @@ function getBasicLanguages(): Promise<{ label: string; entry: string }[]> {
 
 				resolve(
 					files.map((file) => {
-						const entry = file.substring('./release/esm/'.length).replace(/\.js$/, '');
+						const entry = file.substring('./out/monaco-editor/esm/'.length).replace(/\.js$/, '');
 						const label = path.basename(file).replace(/\.contribution\.js$/, '');
 						return {
 							label: label,
@@ -52,7 +52,7 @@ function getBasicLanguages(): Promise<{ label: string; entry: string }[]> {
 function readAdvancedLanguages(): Promise<string[]> {
 	return new Promise((resolve, reject) => {
 		glob(
-			'./release/esm/vs/language/*/monaco.contribution.js',
+			'./out/monaco-editor/esm/vs/language/*/monaco.contribution.js',
 			{ cwd: path.dirname(__dirname) },
 			(err, files) => {
 				if (err) {
@@ -62,7 +62,7 @@ function readAdvancedLanguages(): Promise<string[]> {
 
 				resolve(
 					files
-						.map((file) => file.substring('./release/esm/vs/language/'.length))
+						.map((file) => file.substring('./out/monaco-editor/esm/vs/language/'.length))
 						.map((file) => file.substring(0, file.length - '/monaco.contribution.js'.length))
 				);
 			}
@@ -95,7 +95,7 @@ function getAdvancedLanguages(): Promise<
 	});
 
 	function checkFileExists(moduleName) {
-		const filePath = path.join(REPO_ROOT, 'release/esm', `${moduleName}.js`);
+		const filePath = path.join(REPO_ROOT, 'out/monaco-editor/esm', `${moduleName}.js`);
 		if (!fs.existsSync(filePath)) {
 			console.error(`Could not find ${filePath}.`);
 			process.exit(1);
@@ -174,7 +174,7 @@ export type EditorFeature = ${features.map((el) => `'${el.label}'`).join(' | ')}
 export type NegatedEditorFeature = ${features.map((el) => `'!${el.label}'`).join(' | ')};
 
 `;
-			const dtsDestination = path.join(REPO_ROOT, 'release/esm/metadata.d.ts');
+			const dtsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.d.ts');
 			ensureDir(path.dirname(dtsDestination));
 			fs.writeFileSync(dtsDestination, dtsContents.replace(/\r\n/g, '\n'));
 
@@ -182,9 +182,18 @@ export type NegatedEditorFeature = ${features.map((el) => `'!${el.label}'`).join
 exports.features = ${JSON.stringify(features, null, '  ')};
 exports.languages = ${JSON.stringify(languages, null, '  ')};
 `;
-			const jsDestination = path.join(REPO_ROOT, 'release/esm/metadata.js');
+			const jsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm/metadata.js');
 			ensureDir(path.dirname(jsDestination));
 			fs.writeFileSync(jsDestination, jsContents.replace(/\r\n/g, '\n'));
+
+			for (const feature of [...features, ...languages]) {
+				const entries = [].concat(feature.entry);
+				for (const entry of entries) {
+					const dtsDestination = path.join(REPO_ROOT, 'out/monaco-editor/esm', entry) + '.d.ts';
+					ensureDir(path.dirname(dtsDestination));
+					fs.writeFileSync(dtsDestination, 'export {}\n');
+				}
+			}
 		}
 	);
 }
@@ -213,8 +222,12 @@ function getFeatures(): { label: string; entry: string | string[] }[] {
 
 	let features: string[] = [];
 	const files =
-		fs.readFileSync(path.join(REPO_ROOT, 'release/esm/vs/editor/edcore.main.js')).toString() +
-		fs.readFileSync(path.join(REPO_ROOT, 'release/esm/vs/editor/editor.all.js')).toString();
+		fs
+			.readFileSync(path.join(REPO_ROOT, 'out/monaco-editor/esm/vs/editor/edcore.main.js'))
+			.toString() +
+		fs
+			.readFileSync(path.join(REPO_ROOT, 'out/monaco-editor/esm/vs/editor/editor.all.js'))
+			.toString();
 	files.split(/\r\n|\n/).forEach((line) => {
 		const m = line.match(/import '([^']+)'/);
 		if (m) {

+ 10 - 10
build/utils.ts

@@ -16,7 +16,7 @@ export const REPO_ROOT = path.join(__dirname, '../');
 /**
  * Launch the typescript compiler synchronously over a project.
  */
-export function tsc(_projectPath: string) {
+export function runTsc(_projectPath: string) {
 	const projectPath = path.join(REPO_ROOT, _projectPath);
 	console.log(`Launching compiler at ${_projectPath}...`);
 	const res = cp.spawnSync(
@@ -47,12 +47,12 @@ export function prettier(_filePath: string) {
 /**
  * Transform an external .d.ts file to an internal .d.ts file
  */
-export function dts(_source: string, _destination: string, namespace: string) {
-	const source = path.join(REPO_ROOT, _source);
-	const destination = path.join(REPO_ROOT, _destination);
+export function massageAndCopyDts(source: string, destination: string, namespace: string) {
+	const absoluteSource = path.join(REPO_ROOT, source);
+	const absoluteDestination = path.join(REPO_ROOT, destination);
 
 	const lines = fs
-		.readFileSync(source)
+		.readFileSync(absoluteSource)
 		.toString()
 		.split(/\r\n|\r|\n/);
 
@@ -81,10 +81,10 @@ export function dts(_source: string, _destination: string, namespace: string) {
 	result.push(`}`);
 	result.push(``);
 
-	ensureDir(path.dirname(destination));
-	fs.writeFileSync(destination, result.join('\n'));
+	ensureDir(path.dirname(absoluteDestination));
+	fs.writeFileSync(absoluteDestination, result.join('\n'));
 
-	prettier(_destination);
+	prettier(destination);
 }
 
 export function build(options: import('esbuild').BuildOptions) {
@@ -113,7 +113,7 @@ export function buildESM(options: { base: string; entryPoints: string[]; externa
 		},
 		external: options.external,
 		outbase: `src/${options.base}`,
-		outdir: `out/release/esm/vs/${options.base}/`,
+		outdir: `out/languages/bundled/esm/vs/${options.base}/`,
 		plugins: [
 			alias({
 				'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
@@ -156,7 +156,7 @@ function buildOneAMD(
 			js: 'return moduleExports;\n});'
 		},
 		outbase: `src/${options.base}`,
-		outdir: `out/release/${type}/vs/${options.base}/`,
+		outdir: `out/languages/bundled/amd-${type}/vs/${options.base}/`,
 		plugins: [
 			alias({
 				'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),

+ 0 - 163
build/website.ts

@@ -1,163 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-import glob = require('glob');
-import path = require('path');
-import fs = require('fs');
-import cp = require('child_process');
-import CleanCSS from 'clean-css';
-import { REPO_ROOT, readFiles, writeFiles } from './utils';
-import { removeDir } from './fs';
-
-const MONACO_EDITOR_VERSION: string = (() => {
-	const output = cp.execSync(`npm show monaco-editor version`).toString();
-	const version = output.split(/\r\n|\r|\n/g)[0];
-	if (!/\d+\.\d+\.\d+/.test(version)) {
-		console.log('unrecognized package.json version: ' + version);
-		process.exit(1);
-	}
-	return version;
-})();
-
-removeDir(`../monaco-editor-website`);
-checkSamples();
-generateWebsite();
-
-/**
- * Check that there are samples for all available languages
- */
-function checkSamples() {
-	let languages = glob
-		.sync('src/basic-languages/*/*.contribution.ts', { cwd: REPO_ROOT })
-		.map((f) => path.dirname(f))
-		.map((f) => f.substring('src/basic-languages/'.length));
-	languages.push('css');
-	languages.push('html');
-	languages.push('json');
-	languages.push('typescript');
-
-	// some languages have a different id than their folder
-	languages = languages.map((l) => {
-		switch (l) {
-			case 'coffee':
-				return 'coffeescript';
-			case 'protobuf':
-				return 'proto';
-			case 'solidity':
-				return 'sol';
-			case 'sophia':
-				return 'aes';
-			default:
-				return l;
-		}
-	});
-
-	let fail = false;
-	for (const language of languages) {
-		const expectedSamplePath = path.join(REPO_ROOT, `website/index/samples/sample.${language}.txt`);
-		if (!fs.existsSync(expectedSamplePath)) {
-			console.error(`Missing sample for ${language} at ${expectedSamplePath}`);
-			fail = true;
-		}
-	}
-	if (fail) {
-		process.exit(1);
-	}
-}
-
-function replaceWithRelativeResource(
-	dataPath: string,
-	contents: string,
-	regex: RegExp,
-	callback: (match: string, fileContents: Buffer) => string
-): string {
-	return contents.replace(regex, function (_, m0) {
-		const filePath = path.join(REPO_ROOT, 'website', path.dirname(dataPath), m0);
-		return callback(m0, fs.readFileSync(filePath));
-	});
-}
-
-function generateWebsite() {
-	const files = readFiles('website/**/*', {
-		base: 'website',
-		ignore: ['website/typedoc/**/*'],
-		dot: true
-	});
-
-	for (const file of files) {
-		if (!file.contents || !/\.(html)$/.test(file.path) || /new-samples/.test(file.path)) {
-			continue;
-		}
-
-		let contents = file.contents.toString();
-		contents = contents.replace(/\.\.\/release\/dev/g, 'node_modules/monaco-editor/min');
-		// contents = contents.replace(/\.\.\/\.\.\/release\/dev/g, '../monaco-editor/release/dev');
-		contents = contents.replace(/{{version}}/g, MONACO_EDITOR_VERSION);
-		contents = contents.replace(/{{year}}/g, String(new Date().getFullYear()));
-
-		// Preload xhr contents
-		contents = replaceWithRelativeResource(
-			file.path,
-			contents,
-			/<pre data-preload="([^"]+)".*/g,
-			function (m0, fileContents) {
-				return (
-					'<pre data-preload="' +
-					m0 +
-					'" style="display:none">' +
-					fileContents
-						.toString('utf8')
-						.replace(/&/g, '&amp;')
-						.replace(/</g, '&lt;')
-						.replace(/>/g, '&gt;') +
-					'</pre>'
-				);
-			}
-		);
-
-		// Inline fork.png
-		contents = replaceWithRelativeResource(
-			file.path,
-			contents,
-			/src="(\.\/fork.png)"/g,
-			function (m0, fileContents) {
-				return 'src="data:image/png;base64,' + fileContents.toString('base64') + '"';
-			}
-		);
-
-		// let allCSS = '';
-		contents = replaceWithRelativeResource(
-			file.path,
-			contents,
-			/<link data-inline="yes-please" href="([^"]+)".*/g,
-			function (m0, fileContents) {
-				const minifiedCSS = (new CleanCSS() as any).minify(fileContents.toString('utf8')).styles;
-				return `<style>${minifiedCSS}</style>`;
-			}
-		);
-
-		// Inline javascript
-		contents = replaceWithRelativeResource(
-			file.path,
-			contents,
-			/<script data-inline="yes-please" src="([^"]+)".*/g,
-			function (m0, fileContents) {
-				return '<script>' + fileContents.toString('utf8') + '</script>';
-			}
-		);
-
-		file.contents = Buffer.from(contents.split(/\r\n|\r|\n/).join('\n'));
-	}
-
-	writeFiles(files, `../monaco-editor-website`);
-
-	// temporarily create package.json so that npm install doesn't bark
-	fs.writeFileSync(path.join(REPO_ROOT, '../monaco-editor-website/package.json'), '{}');
-	fs.writeFileSync(path.join(REPO_ROOT, '../monaco-editor-website/.nojekyll'), '');
-	cp.execSync('npm install monaco-editor', {
-		cwd: path.join(REPO_ROOT, '../monaco-editor-website')
-	});
-	fs.unlinkSync(path.join(REPO_ROOT, '../monaco-editor-website/package.json'));
-}

+ 275 - 0
docs/code-structure.dio.svg

@@ -0,0 +1,275 @@
+<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="601px" height="391px" viewBox="-0.5 -0.5 601 391" content="&lt;mxfile&gt;&lt;diagram id=&quot;cU4r2CM7fKKh95v30pN0&quot; name=&quot;Page-1&quot;&gt;1Vpdk9osFP41XrqThBj1sqvd9qKd6XTfmbaXmKChjSED8au//j0kkA+IdtXo7t6sgcAJPOechwfYAZqt9584zuKvLCLJwHOi/QDNB57nOhMHfmTNoayZ+KpixWmkGtUVz/Qv0T1V7YZGRLQa5owlOc3alSFLUxLmrTrMOdu1my1Z0v5qhlfEqngOcWLX/qBRHqtZeOO6/jOhq1h/2Q2m5Zs11o3VTESMI7ZrVKGPAzTjjOXl03o/I4kET+NS9ns68rYaGCdp/pIOHlLjyA96ciSCuapiylL4eYzzdQIlFx7JnuY/4dl5GKnSr8abuXSxowsHXUhzfmh0ksVfzXd1t6Kk+5VDk+M5OjtVJdiGh7pVoCIC8xXRzcYVthCUhK0JfAfacJLgnG7b9rGKjlXVrgYQHhSG3Xgir7SxxclGWf3G2bYIVxhSTOrByrjjneh/wQtImBbsOKGrFJ5DmDnhULElPKcQkR/UizWNImnjkRNB/+JFYU+CmDGa5sWMRo+D0byCVRog+0FHuqjOdZA2AS8DxkZSWXIeIJnLXiq3FSAvRlqZ/iaHXdsdul7L6tD32ybYcinA26arqhG+yHs6dBre+0Tzz5sF1H0nGRM0Z3KUQQJoPC7Ae8FKPq1pyJlgS/j+01aEwHeWX3cxzclzhoso3QEttv171CdWsB+F3tXuUhAFU1Xe1RTlauaNG/QUONfHvTu2kEuzdTH+8I9kUxszluKQDUkkMR2GjJ+N2ZImyYwlkEQVUZlZkbPsNuBWK9a/wHWdPtCdXh+XLbzPhbob1w4H9AA1mvw7jpHfBbXbA9TazxcG8ivkPZq28XIdryM2gxslPhrdV0B4ZykIkkYfpN6TK2eChaBhWflEk7YHzhUZlexsiIyGgLtMZBRdYbz40Gig1u+jK6M/NphpZCg+sz0y2k8cw9/lCC5dQ5G9EjQUUILT1aZII2dJcL7htSASdmrRNEw2EU1X0Oi/QwYSnNMM5jKTgSxDqngKhSgffguW2kZwGsE7BtqLi85Yfctyq0yvE3ILTYO2MlLGr9VbuovWW1p/9aq39EcasfIEezHCbS+CKcHDV6DXkdPOl3HXyu90sOuoj9XIv5RdG9xaM203u0ZYxCTSBm7GmF4f7GgFanUmoOnM1FslQ6te10WrrcLmRAAlLSSJxYCZPIaAP4sNTaJ3RzVlrJ2gGteZGJsw1AvXGNJ6aBjoh2nsffkppinWGXu1uL+Yuy/bjC9lGyXLzhVz47PE3J14SgnaXo+PLlJ2gdbWmtrMszwzjwLnVPvrlZ29NZqTLVTMSQbIkzQ8vD/SO+LZivTGAGubnrx+SK9tdHIDzkPBxel8h2y+awK/ztYsMBMSnU7gkaFlpqjnBJ5YCaxONR7KrdM7S94ywE9tjnyt2Qxtce3uqG01GN9CsYxsxUKTjvMnMHTSi7cXLYH7iqIF3fkG640cQKE3cwBl7sCm0/MOoIz217OcbyWOdQVXXjc4+sy2PoF6bwx4+jZu6Dw4vtvrfdxNBYt9HCRimmUg+o+76A4Xa+aJadfFWtf5un8+vUGxvvwvIaz/hQJ9/B8=&lt;/diagram&gt;&lt;/mxfile&gt;">
+    <defs/>
+    <g>
+        <path d="M 90 60 L 90 143.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
+        <path d="M 90 148.88 L 86.5 141.88 L 90 143.63 L 93.5 141.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 74px; margin-left: 80px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                Provides the source for
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="80" y="77" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    Provides the source for
+                </text>
+            </switch>
+        </g>
+        <rect x="0" y="0" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 30px; margin-left: 1px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                GitHub Repository
+                                <br/>
+                                microsoft/vscode
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="90" y="34" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    GitHub Repository...
+                </text>
+            </switch>
+        </g>
+        <rect x="0" y="150" width="180" height="100" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 157px; margin-left: 1px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                npm package
+                                <br/>
+                                monaco-editor-core
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="90" y="169" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    npm package...
+                </text>
+            </switch>
+        </g>
+        <rect x="260" y="0" width="340" height="110" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 338px; height: 1px; padding-top: 7px; margin-left: 261px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                GitHub Repository
+                                <br/>
+                                microsoft/monaco-editor
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="430" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    GitHub Repository...
+                </text>
+            </switch>
+        </g>
+        <rect x="270" y="330" width="160" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 360px; margin-left: 271px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                npm package
+                                <br/>
+                                monaco-editor
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="350" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    npm package...
+                </text>
+            </switch>
+        </g>
+        <path d="M 430 100 L 358 154 Q 350 160 342 166 L 318 184 Q 310 190 310 200 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
+        <path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 231px; margin-left: 290px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                Provides language feature sources
+                                <br/>
+                                including TypeScript, html, css, json
+                                <br/>
+                                and others
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="290" y="234" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    Provides language feature sources...
+                </text>
+            </switch>
+        </g>
+        <rect x="380" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 381px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                Folder
+                                <br/>
+                                /src
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="430" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    Folder...
+                </text>
+            </switch>
+        </g>
+        <path d="M 270 75 L 96.25 108.78" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
+        <path d="M 91.1 109.79 L 97.3 105.01 L 96.25 108.78 L 98.64 111.89 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 91px; margin-left: 190px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                Describe how to build
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="190" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    Describe how to build
+                </text>
+            </switch>
+        </g>
+        <rect x="270" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 271px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                Folder
+                                <br/>
+                                /scripts
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="320" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    Folder...
+                </text>
+            </switch>
+        </g>
+        <path d="M 515 100 L 515 120 Q 515 130 505 130 L 150 130 Q 140 130 138.27 136.91 L 136.54 143.82" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
+        <path d="M 135.27 148.92 L 133.57 141.28 L 136.54 143.82 L 140.36 142.97 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 120px; margin-left: 181px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                Dev Dependency
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="181" y="124" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    Dev Dependency
+                </text>
+            </switch>
+        </g>
+        <path d="M 540 100 L 540 130 Q 540 140 531.68 145.55 L 398.32 234.45 Q 390 240 390 250 L 390 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
+        <path d="M 390 328.88 L 386.5 321.88 L 390 323.63 L 393.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 300px; margin-left: 391px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                package.json
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="391" y="303" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    package.json
+                </text>
+            </switch>
+        </g>
+        <rect x="490" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 491px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                File
+                                <br/>
+                                /package.json
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="540" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    File...
+                </text>
+            </switch>
+        </g>
+        <path d="M 90 240 L 90 290 Q 90 300 100 300 L 300 300 Q 310 300 310 310 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
+        <path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 290px; margin-left: 179px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
+                                Provides the core editor sources
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="179" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
+                    Provides the core editor sources
+                </text>
+            </switch>
+        </g>
+        <rect x="10" y="200" width="160" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
+        <g transform="translate(-0.5 -0.5)">
+            <switch>
+                <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
+                    <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 220px; margin-left: 11px;">
+                        <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
+                            <div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
+                                shipped sources
+                            </div>
+                        </div>
+                    </div>
+                </foreignObject>
+                <text x="90" y="224" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
+                    shipped sources
+                </text>
+            </switch>
+        </g>
+    </g>
+    <switch>
+        <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
+        <a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
+            <text text-anchor="middle" font-size="10px" x="50%" y="100%">
+                Text is not SVG - cannot display
+            </text>
+        </a>
+    </switch>
+</svg>

BIN
docs/debugging-core.gif


BIN
docs/debugging-languages.gif


BIN
docs/launch config.png


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
docs/out-folders.dio.svg


Diff do ficheiro suprimidas por serem muito extensas
+ 471 - 216
package-lock.json


+ 17 - 13
package.json

@@ -1,13 +1,13 @@
 {
 	"name": "monaco-editor",
-	"version": "0.34.1",
-	"vscodeRef": "0316a754aa4c25208bef91937efbce2ab1e3ce37",
+	"version": "0.40.0",
+	"vscodeRef": "660393deaaa6d1996740ff4880f1bad43768c814",
 	"private": true,
 	"description": "A browser based code editor",
+	"homepage": "https://github.com/microsoft/monaco-editor",
 	"author": "Microsoft Corporation",
 	"license": "MIT",
 	"scripts": {
-		"build-website": "ts-node ./build/website && npm run typedoc",
 		"import-typescript": "ts-node ./build/importTypescript",
 		"playwright-install": "node ./node_modules/playwright/install.js",
 		"playwright-install-deps": "playwright install-deps",
@@ -15,7 +15,6 @@
 		"prettier-check": "prettier --check .",
 		"prettier": "prettier --write .",
 		"pretty-quick": "pretty-quick --staged",
-		"release": "ts-node ./build/build && ts-node ./build/release",
 		"simpleserver": "ts-node ./build/simpleserver",
 		"package-for-smoketest-webpack": "ts-node ./test/smoke/package-webpack",
 		"package-for-smoketest-webpack-cross-origin": "ts-node ./test/smoke/package-webpack --cross-origin",
@@ -23,11 +22,13 @@
 		"package-for-smoketest-vite": "ts-node ./test/smoke/package-vite",
 		"smoketest": "node ./test/smoke/runner.js",
 		"smoketest-debug": "node ./test/smoke/runner.js --debug-tests",
-		"test": "mocha test/unit/all.js",
+		"test": "mocha test/unit/all.js && ts-node ./build/check-samples",
 		"deps-all-remove": "ts-node ./build/npm/removeAll",
 		"deps-all-install": "ts-node ./build/npm/installAll",
-		"typedoc": "cd website/typedoc && \"../../node_modules/.bin/typedoc\" --options ./typedoc.json",
-		"watch": "tsc -w -p ./src"
+		"update-actions": "pin-github-action ./.github/workflows/website.yml",
+		"watch": "tsc -w -p ./src",
+		"build": "ts-node ./build/build-languages",
+		"build-monaco-editor": "npm run build && ts-node ./build/build-monaco-editor"
 	},
 	"typings": "./esm/vs/editor/editor.api.d.ts",
 	"module": "./esm/vs/editor/editor.main.js",
@@ -37,6 +38,7 @@
 	},
 	"devDependencies": {
 		"@types/mocha": "^9.1.0",
+		"@types/shelljs": "^0.8.11",
 		"@typescript/vfs": "^1.3.5",
 		"chai": "^4.3.6",
 		"clean-css": "^5.2.4",
@@ -45,29 +47,31 @@
 		"esbuild-plugin-alias": "^0.2.1",
 		"file-loader": "^6.2.0",
 		"glob": "^7.2.0",
+		"http-server": "^14.1.1",
 		"husky": "^7.0.4",
 		"jsdom": "^19.0.0",
 		"jsonc-parser": "^3.0.0",
 		"mocha": "^9.2.0",
-		"monaco-editor-core": "0.35.0-dev.20221208",
+		"monaco-editor-core": "^0.40.0-dev.20230629",
 		"parcel": "^2.7.0",
-		"playwright": "^1.18.1",
+		"pin-github-action": "^1.8.0",
+		"playwright": "^1.32.2",
 		"prettier": "^2.5.1",
 		"pretty-quick": "^3.1.3",
 		"requirejs": "^2.3.6",
+		"shelljs": "^0.8.5",
 		"style-loader": "^3.3.1",
 		"terser": "^5.14.2",
 		"ts-node": "^10.6.0",
-		"typedoc": "^0.22.11",
-		"typescript": "4.5.5",
-		"vite": "^3.1.8",
+		"typescript": "^5.0.2",
+		"vite": "^3.2.7",
 		"vscode-css-languageservice": "5.4.1",
 		"vscode-html-languageservice": "4.2.4",
 		"vscode-json-languageservice": "4.2.1",
 		"vscode-languageserver-textdocument": "^1.0.4",
 		"vscode-languageserver-types": "3.16.0",
 		"vscode-uri": "3.0.3",
-		"webpack": "^5.74.0",
+		"webpack": "^5.76.0",
 		"yaserver": "^0.4.0"
 	},
 	"alias": {

+ 23 - 23
samples/browser-esm-vite-react/package-lock.json

@@ -12,8 +12,8 @@
 				"monaco-editor": "^0.32.0",
 				"react": "^17.0.2",
 				"react-dom": "^17.0.2",
-				"typescript": "^4.5.5",
-				"vite": "^2.9.13"
+				"typescript": "^5.0.2",
+				"vite": "^2.9.16"
 			}
 		},
 		"node_modules/@ampproject/remapping": {
@@ -1104,9 +1104,9 @@
 			}
 		},
 		"node_modules/json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true,
 			"bin": {
 				"json5": "lib/cli.js"
@@ -1359,28 +1359,28 @@
 			}
 		},
 		"node_modules/typescript": {
-			"version": "4.6.3",
-			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
-			"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true,
 			"bin": {
 				"tsc": "bin/tsc",
 				"tsserver": "bin/tsserver"
 			},
 			"engines": {
-				"node": ">=4.2.0"
+				"node": ">=12.20"
 			}
 		},
 		"node_modules/vite": {
-			"version": "2.9.13",
-			"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.13.tgz",
-			"integrity": "sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==",
+			"version": "2.9.16",
+			"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.16.tgz",
+			"integrity": "sha512-X+6q8KPyeuBvTQV8AVSnKDvXoBMnTx8zxh54sOwmmuOdxkjMmEJXH2UEchA+vTMps1xw9vL64uwJOWryULg7nA==",
 			"dev": true,
 			"dependencies": {
 				"esbuild": "^0.14.27",
 				"postcss": "^8.4.13",
 				"resolve": "^1.22.0",
-				"rollup": "^2.59.0"
+				"rollup": ">=2.59.0 <2.78.0"
 			},
 			"bin": {
 				"vite": "bin/vite.js"
@@ -2116,9 +2116,9 @@
 			"dev": true
 		},
 		"json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true
 		},
 		"loose-envify": {
@@ -2292,22 +2292,22 @@
 			"dev": true
 		},
 		"typescript": {
-			"version": "4.6.3",
-			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
-			"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true
 		},
 		"vite": {
-			"version": "2.9.13",
-			"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.13.tgz",
-			"integrity": "sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw==",
+			"version": "2.9.16",
+			"resolved": "https://registry.npmjs.org/vite/-/vite-2.9.16.tgz",
+			"integrity": "sha512-X+6q8KPyeuBvTQV8AVSnKDvXoBMnTx8zxh54sOwmmuOdxkjMmEJXH2UEchA+vTMps1xw9vL64uwJOWryULg7nA==",
 			"dev": true,
 			"requires": {
 				"esbuild": "^0.14.27",
 				"fsevents": "~2.3.2",
 				"postcss": "^8.4.13",
 				"resolve": "^1.22.0",
-				"rollup": "^2.59.0"
+				"rollup": ">=2.59.0 <2.78.0"
 			}
 		}
 	}

+ 2 - 2
samples/browser-esm-vite-react/package.json

@@ -14,7 +14,7 @@
 		"@types/react": "^17.0.39",
 		"@types/react-dom": "^17.0.11",
 		"@vitejs/plugin-react": "^1.1.4",
-		"typescript": "^4.5.5",
-		"vite": "^2.9.13"
+		"typescript": "^5.0.2",
+		"vite": "^2.9.16"
 	}
 }

+ 7 - 5
samples/browser-esm-vite-react/src/components/Editor.tsx

@@ -7,13 +7,15 @@ export const Editor: VFC = () => {
 	const monacoEl = useRef(null);
 
 	useEffect(() => {
-		if (monacoEl && !editor) {
-			setEditor(
-				monaco.editor.create(monacoEl.current!, {
+		if (monacoEl) {
+			setEditor((editor) => {
+				if (editor) return editor;
+
+				return monaco.editor.create(monacoEl.current!, {
 					value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
 					language: 'typescript'
-				})
-			);
+				});
+			});
 		}
 
 		return () => editor?.dispose();

+ 1 - 1
samples/browser-esm-webpack-small/index.js

@@ -17,7 +17,7 @@ import 'monaco-editor/esm/vs/editor/browser/controller/coreCommands.js';
 // import 'monaco-editor/esm/vs/editor/contrib/cursorUndo/cursorUndo.js';
 // import 'monaco-editor/esm/vs/editor/contrib/dnd/dnd.js';
 // import 'monaco-editor/esm/vs/editor/contrib/documentSymbols/documentSymbols.js';
-import 'monaco-editor/esm/vs/editor/contrib/find/findController.js';
+import 'monaco-editor/esm/vs/editor/contrib/find/browser/findController.js';
 // import 'monaco-editor/esm/vs/editor/contrib/folding/folding.js';
 // import 'monaco-editor/esm/vs/editor/contrib/fontZoom/fontZoom.js';
 // import 'monaco-editor/esm/vs/editor/contrib/format/formatActions.js';

+ 58 - 58
samples/browser-esm-webpack-typescript-react/package-lock.json

@@ -1892,9 +1892,9 @@
 			"dev": true
 		},
 		"node_modules/@types/node": {
-			"version": "17.0.23",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
-			"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
 			"dev": true,
 			"peer": true
 		},
@@ -2106,9 +2106,9 @@
 			"peer": true
 		},
 		"node_modules/acorn": {
-			"version": "8.7.0",
-			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-			"integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+			"version": "8.8.2",
+			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+			"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
 			"dev": true,
 			"peer": true,
 			"bin": {
@@ -2488,9 +2488,9 @@
 			}
 		},
 		"node_modules/enhanced-resolve": {
-			"version": "5.9.2",
-			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz",
-			"integrity": "sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==",
+			"version": "5.12.0",
+			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+			"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
 			"dev": true,
 			"peer": true,
 			"dependencies": {
@@ -2692,9 +2692,9 @@
 			}
 		},
 		"node_modules/graceful-fs": {
-			"version": "4.2.9",
-			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
-			"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
+			"version": "4.2.10",
+			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+			"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
 			"dev": true,
 			"peer": true
 		},
@@ -2808,10 +2808,10 @@
 				"node": ">=4"
 			}
 		},
-		"node_modules/json-parse-better-errors": {
-			"version": "1.0.2",
-			"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
-			"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+		"node_modules/json-parse-even-better-errors": {
+			"version": "2.3.1",
+			"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+			"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
 			"dev": true,
 			"peer": true
 		},
@@ -2822,9 +2822,9 @@
 			"dev": true
 		},
 		"node_modules/json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true,
 			"bin": {
 				"json5": "lib/cli.js"
@@ -3509,9 +3509,9 @@
 			}
 		},
 		"node_modules/watchpack": {
-			"version": "2.3.1",
-			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
-			"integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+			"version": "2.4.0",
+			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+			"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
 			"dev": true,
 			"peer": true,
 			"dependencies": {
@@ -3523,9 +3523,9 @@
 			}
 		},
 		"node_modules/webpack": {
-			"version": "5.70.0",
-			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
-			"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
+			"version": "5.76.1",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz",
+			"integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==",
 			"dev": true,
 			"peer": true,
 			"dependencies": {
@@ -3534,24 +3534,24 @@
 				"@webassemblyjs/ast": "1.11.1",
 				"@webassemblyjs/wasm-edit": "1.11.1",
 				"@webassemblyjs/wasm-parser": "1.11.1",
-				"acorn": "^8.4.1",
+				"acorn": "^8.7.1",
 				"acorn-import-assertions": "^1.7.6",
 				"browserslist": "^4.14.5",
 				"chrome-trace-event": "^1.0.2",
-				"enhanced-resolve": "^5.9.2",
+				"enhanced-resolve": "^5.10.0",
 				"es-module-lexer": "^0.9.0",
 				"eslint-scope": "5.1.1",
 				"events": "^3.2.0",
 				"glob-to-regexp": "^0.4.1",
 				"graceful-fs": "^4.2.9",
-				"json-parse-better-errors": "^1.0.2",
+				"json-parse-even-better-errors": "^2.3.1",
 				"loader-runner": "^4.2.0",
 				"mime-types": "^2.1.27",
 				"neo-async": "^2.6.2",
 				"schema-utils": "^3.1.0",
 				"tapable": "^2.1.1",
 				"terser-webpack-plugin": "^5.1.3",
-				"watchpack": "^2.3.1",
+				"watchpack": "^2.4.0",
 				"webpack-sources": "^3.2.3"
 			},
 			"bin": {
@@ -4892,9 +4892,9 @@
 			"dev": true
 		},
 		"@types/node": {
-			"version": "17.0.23",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
-			"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
 			"dev": true,
 			"peer": true
 		},
@@ -5106,9 +5106,9 @@
 			"peer": true
 		},
 		"acorn": {
-			"version": "8.7.0",
-			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-			"integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+			"version": "8.8.2",
+			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+			"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
 			"dev": true,
 			"peer": true
 		},
@@ -5382,9 +5382,9 @@
 			"dev": true
 		},
 		"enhanced-resolve": {
-			"version": "5.9.2",
-			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz",
-			"integrity": "sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==",
+			"version": "5.12.0",
+			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+			"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
 			"dev": true,
 			"peer": true,
 			"requires": {
@@ -5540,9 +5540,9 @@
 			"dev": true
 		},
 		"graceful-fs": {
-			"version": "4.2.9",
-			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
-			"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
+			"version": "4.2.10",
+			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+			"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
 			"dev": true,
 			"peer": true
 		},
@@ -5625,10 +5625,10 @@
 			"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
 			"dev": true
 		},
-		"json-parse-better-errors": {
-			"version": "1.0.2",
-			"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
-			"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+		"json-parse-even-better-errors": {
+			"version": "2.3.1",
+			"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+			"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
 			"dev": true,
 			"peer": true
 		},
@@ -5639,9 +5639,9 @@
 			"dev": true
 		},
 		"json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true
 		},
 		"loader-runner": {
@@ -6150,9 +6150,9 @@
 			}
 		},
 		"watchpack": {
-			"version": "2.3.1",
-			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
-			"integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+			"version": "2.4.0",
+			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+			"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
 			"dev": true,
 			"peer": true,
 			"requires": {
@@ -6161,9 +6161,9 @@
 			}
 		},
 		"webpack": {
-			"version": "5.70.0",
-			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
-			"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
+			"version": "5.76.1",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz",
+			"integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==",
 			"dev": true,
 			"peer": true,
 			"requires": {
@@ -6172,24 +6172,24 @@
 				"@webassemblyjs/ast": "1.11.1",
 				"@webassemblyjs/wasm-edit": "1.11.1",
 				"@webassemblyjs/wasm-parser": "1.11.1",
-				"acorn": "^8.4.1",
+				"acorn": "^8.7.1",
 				"acorn-import-assertions": "^1.7.6",
 				"browserslist": "^4.14.5",
 				"chrome-trace-event": "^1.0.2",
-				"enhanced-resolve": "^5.9.2",
+				"enhanced-resolve": "^5.10.0",
 				"es-module-lexer": "^0.9.0",
 				"eslint-scope": "5.1.1",
 				"events": "^3.2.0",
 				"glob-to-regexp": "^0.4.1",
 				"graceful-fs": "^4.2.9",
-				"json-parse-better-errors": "^1.0.2",
+				"json-parse-even-better-errors": "^2.3.1",
 				"loader-runner": "^4.2.0",
 				"mime-types": "^2.1.27",
 				"neo-async": "^2.6.2",
 				"schema-utils": "^3.1.0",
 				"tapable": "^2.1.1",
 				"terser-webpack-plugin": "^5.1.3",
-				"watchpack": "^2.3.1",
+				"watchpack": "^2.4.0",
 				"webpack-sources": "^3.2.3"
 			}
 		},

+ 41 - 26
samples/package-lock.json

@@ -19,8 +19,8 @@
 				"style-loader": "^3.3.1",
 				"terser-webpack-plugin": "^5.3.1",
 				"ts-loader": "^9.2.6",
-				"typescript": "^4.5.5",
-				"webpack": "^5.68.0",
+				"typescript": "^5.0.2",
+				"webpack": "^5.76.0",
 				"webpack-cli": "^4.9.2",
 				"webpack-dev-server": "^4.7.4",
 				"yaserver": "^0.4.0"
@@ -294,9 +294,10 @@
 			"license": "MIT"
 		},
 		"node_modules/@types/node": {
-			"version": "18.7.1",
-			"dev": true,
-			"license": "MIT"
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
+			"dev": true
 		},
 		"node_modules/@types/qs": {
 			"version": "6.9.7",
@@ -1395,9 +1396,9 @@
 			"license": "ISC"
 		},
 		"node_modules/electron/node_modules/@types/node": {
-			"version": "16.18.3",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.3.tgz",
-			"integrity": "sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg==",
+			"version": "16.18.14",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.14.tgz",
+			"integrity": "sha512-wvzClDGQXOCVNU4APPopC2KtMYukaF1MN/W3xAmslx22Z4/IF1/izDMekuyoUlwfnDHYCIZGaj7jMwnJKBTxKw==",
 			"dev": true
 		},
 		"node_modules/emojis-list": {
@@ -2082,9 +2083,10 @@
 			}
 		},
 		"node_modules/http-cache-semantics": {
-			"version": "4.1.0",
-			"dev": true,
-			"license": "BSD-2-Clause"
+			"version": "4.1.1",
+			"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+			"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
+			"dev": true
 		},
 		"node_modules/http-deceiver": {
 			"version": "1.2.7",
@@ -2417,9 +2419,10 @@
 			"optional": true
 		},
 		"node_modules/json5": {
-			"version": "2.2.1",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true,
-			"license": "MIT",
 			"bin": {
 				"json5": "lib/cli.js"
 			},
@@ -4075,15 +4078,16 @@
 			"license": "MIT"
 		},
 		"node_modules/typescript": {
-			"version": "4.7.4",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true,
-			"license": "Apache-2.0",
 			"bin": {
 				"tsc": "bin/tsc",
 				"tsserver": "bin/tsserver"
 			},
 			"engines": {
-				"node": ">=4.2.0"
+				"node": ">=12.20"
 			}
 		},
 		"node_modules/universalify": {
@@ -4190,9 +4194,10 @@
 			}
 		},
 		"node_modules/webpack": {
-			"version": "5.74.0",
+			"version": "5.76.0",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+			"integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
 			"dev": true,
-			"license": "MIT",
 			"dependencies": {
 				"@types/eslint-scope": "^3.7.3",
 				"@types/estree": "^0.0.51",
@@ -4709,7 +4714,9 @@
 			"dev": true
 		},
 		"@types/node": {
-			"version": "18.7.1",
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
 			"dev": true
 		},
 		"@types/qs": {
@@ -5438,9 +5445,9 @@
 			},
 			"dependencies": {
 				"@types/node": {
-					"version": "16.18.3",
-					"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.3.tgz",
-					"integrity": "sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg==",
+					"version": "16.18.14",
+					"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.14.tgz",
+					"integrity": "sha512-wvzClDGQXOCVNU4APPopC2KtMYukaF1MN/W3xAmslx22Z4/IF1/izDMekuyoUlwfnDHYCIZGaj7jMwnJKBTxKw==",
 					"dev": true
 				}
 			}
@@ -5880,7 +5887,9 @@
 			}
 		},
 		"http-cache-semantics": {
-			"version": "4.1.0",
+			"version": "4.1.1",
+			"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+			"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
 			"dev": true
 		},
 		"http-deceiver": {
@@ -6082,7 +6091,9 @@
 			"optional": true
 		},
 		"json5": {
-			"version": "2.2.1",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"dev": true
 		},
 		"jsonfile": {
@@ -7123,7 +7134,9 @@
 			"dev": true
 		},
 		"typescript": {
-			"version": "4.7.4",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true
 		},
 		"universalify": {
@@ -7185,7 +7198,9 @@
 			}
 		},
 		"webpack": {
-			"version": "5.74.0",
+			"version": "5.76.0",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+			"integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
 			"dev": true,
 			"requires": {
 				"@types/eslint-scope": "^3.7.3",

+ 2 - 2
samples/package.json

@@ -20,10 +20,10 @@
 		"style-loader": "^3.3.1",
 		"terser-webpack-plugin": "^5.3.1",
 		"ts-loader": "^9.2.6",
-		"typescript": "^4.5.5",
+		"typescript": "^5.0.2",
 		"webpack-cli": "^4.9.2",
 		"webpack-dev-server": "^4.7.4",
-		"webpack": "^5.68.0",
+		"webpack": "^5.76.0",
 		"yaserver": "^0.4.0"
 	},
 	"overrides": {

+ 6 - 0
scripts/ci/env.ts

@@ -0,0 +1,6 @@
+export function getEnv(): {
+	VSCODE_REF: string | undefined;
+	PRERELEASE_VERSION: string | undefined;
+} {
+	return process.env as any;
+}

+ 16 - 5
scripts/ci/prepare-monaco-editor-core.ts → scripts/ci/monaco-editor-core-prepare.ts

@@ -1,6 +1,7 @@
 import { mkdir, rm } from 'fs/promises';
 import { join, resolve } from 'path';
-import { group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
+import { PackageJson, group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
+import { getEnv } from './env';
 
 const selfPath = __dirname;
 const rootPath = join(selfPath, '..', '..');
@@ -21,8 +22,8 @@ async function prepareMonacoEditorCoreReleaseStableOrNightly() {
 		version = monacoEditorPackageJson.version;
 		ref = monacoEditorPackageJson.vscodeRef;
 	} else if (arg === 'nightly') {
-		version = getNightlyVersion(monacoEditorPackageJson.version);
-		ref = 'main';
+		version = getNightlyVersion(monacoEditorPackageJson.version, getEnv().PRERELEASE_VERSION);
+		ref = getEnv().VSCODE_REF || 'main';
 	} else {
 		throw new Error('Invalid argument');
 	}
@@ -37,9 +38,17 @@ async function prepareMonacoEditorCoreRelease(version: string, vscodeRef: string
 
 	await rm(dependenciesPath, { force: true, recursive: true });
 
+	let vscodeCommitId: string;
+
 	await group('Checkout vscode', async () => {
-		await gitShallowClone(vscodePath, 'https://github.com/microsoft/vscode.git', vscodeRef);
+		const result = await gitShallowClone(
+			vscodePath,
+			'https://github.com/microsoft/vscode.git',
+			vscodeRef
+		);
+		vscodeCommitId = result.commitId;
 	});
+
 	await group('Checkout vscode-loc', async () => {
 		await gitShallowClone(
 			// Must be a sibling to the vscode repository
@@ -54,8 +63,10 @@ async function prepareMonacoEditorCoreRelease(version: string, vscodeRef: string
 			vscodePath,
 			'./build/monaco/package.json'
 		);
-		const packageJson = require(monacoEditorCorePackageJsonSourcePath) as { version: string };
+		const packageJson = require(monacoEditorCorePackageJsonSourcePath) as PackageJson;
 		packageJson.version = version;
+		// This ensures we can always figure out which commit monaco-editor-core was built from
+		packageJson.vscodeCommitId = vscodeCommitId;
 		await writeJsonFile(monacoEditorCorePackageJsonSourcePath, packageJson);
 	});
 

+ 72 - 0
scripts/ci/monaco-editor-prepare.ts

@@ -0,0 +1,72 @@
+import { readFile } from 'fs/promises';
+import { join, resolve } from 'path';
+import { PackageJson, getNightlyVersion, group, run, writeJsonFile, gitCommitId } from '../lib';
+import { getEnv } from './env';
+
+const selfPath = __dirname;
+const rootPath = join(selfPath, '..', '..');
+const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
+const monacoEditorCorePackageJsonPath = resolve(
+	rootPath,
+	'node_modules',
+	'monaco-editor-core',
+	'package.json'
+);
+
+async function prepareMonacoEditorReleaseStableOrNightly() {
+	const monacoEditorPackageJson = JSON.parse(
+		await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
+	) as PackageJson;
+
+	let version: string;
+
+	const arg = process.argv[2];
+	if (arg === 'stable') {
+		version = monacoEditorPackageJson.version;
+	} else if (arg === 'nightly') {
+		version = getNightlyVersion(monacoEditorPackageJson.version, getEnv().PRERELEASE_VERSION);
+	} else {
+		throw new Error('Invalid argument');
+	}
+
+	await prepareMonacoEditorRelease(version);
+
+	// npm package is now in ./out/monaco-editor, ready to be published
+}
+
+async function prepareMonacoEditorRelease(monacoEditorCoreVersion: string) {
+	await group('npm ci', async () => {
+		await run('npm ci', { cwd: resolve(rootPath, 'webpack-plugin') });
+	});
+
+	await group('Set Version & Update monaco-editor-core Version', async () => {
+		const packageJson = JSON.parse(
+			await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
+		) as PackageJson;
+		packageJson.version = monacoEditorCoreVersion;
+		packageJson.devDependencies['monaco-editor-core'] = monacoEditorCoreVersion;
+		await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
+	});
+
+	await group('npm install to pick up monaco-editor-core', async () => {
+		await run('npm install', { cwd: rootPath });
+	});
+
+	await group('Setting vscode commitId from monaco-editor-core', async () => {
+		const monacoEditorCorePackageJson = JSON.parse(
+			await readFile(monacoEditorCorePackageJsonPath, { encoding: 'utf-8' })
+		) as PackageJson;
+		const packageJson = JSON.parse(
+			await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
+		) as PackageJson;
+		packageJson.vscodeCommitId = monacoEditorCorePackageJson.vscodeCommitId;
+		packageJson.monacoCommitId = await gitCommitId(rootPath);
+		await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
+	});
+
+	await group('Building & Testing', async () => {
+		await run(resolve(selfPath, './monaco-editor.sh'), { cwd: rootPath });
+	});
+}
+
+prepareMonacoEditorReleaseStableOrNightly();

+ 2 - 7
scripts/ci/monaco-editor.sh

@@ -1,14 +1,12 @@
 #!/bin/bash
 set -e
 
-# execute `npm install` to pick up local monaco-editor-core
-npm install
 # Install OS Dependencies for Playwright
 sudo npm run playwright-install-deps
 # Check prettier
 npm run prettier-check
 # Build
-npm run release
+npm run build-monaco-editor
 
 # Run unit tests
 npm test
@@ -27,7 +25,4 @@ npm run package-for-smoketest-parcel --prefix test/smoke/parcel
 # Run smoke test
 npm run smoketest
 
-# Build website
-npm run build-website
-
-# npm package is now ready to be published in ./release
+# npm package is now ready to be published in ./out/monaco-editor

+ 0 - 50
scripts/ci/prepare-monaco-editor.ts

@@ -1,50 +0,0 @@
-import { readFile } from 'fs/promises';
-import { join, resolve } from 'path';
-import { getNightlyVersion, group, run, writeJsonFile } from '../lib';
-
-const selfPath = __dirname;
-const rootPath = join(selfPath, '..', '..');
-const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
-
-async function prepareMonacoEditorReleaseStableOrNightly() {
-	const monacoEditorPackageJson = JSON.parse(
-		await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
-	) as { version: string };
-
-	let version: string;
-
-	const arg = process.argv[2];
-	if (arg === 'stable') {
-		version = monacoEditorPackageJson.version;
-	} else if (arg === 'nightly') {
-		version = getNightlyVersion(monacoEditorPackageJson.version);
-	} else {
-		throw new Error('Invalid argument');
-	}
-
-	await prepareMonacoEditorRelease(version);
-
-	// npm package is now in ./release, ready to be published
-}
-
-async function prepareMonacoEditorRelease(version: string) {
-	await group('npm ci', async () => {
-		await run('npm ci', { cwd: resolve(rootPath, 'webpack-plugin') });
-	});
-
-	await group('Set Version', async () => {
-		const packageJson = JSON.parse(
-			await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
-		) as { version: string; devDependencies: Record<string, string> };
-		packageJson.version = version;
-		packageJson.devDependencies['monaco-editor-core'] = version;
-
-		await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
-	});
-
-	await group('Building & Testing', async () => {
-		await run(resolve(selfPath, './monaco-editor.sh'), { cwd: rootPath });
-	});
-}
-
-prepareMonacoEditorReleaseStableOrNightly();

+ 42 - 3
scripts/lib/index.ts

@@ -19,13 +19,42 @@ export async function run(command: string, options: RunOptions) {
 	});
 }
 
-export async function gitShallowClone(targetPath: string, repositoryUrl: string, ref: string) {
+export async function runGetOutput(command: string, options: RunOptions): Promise<string> {
+	console.log(`Running ${command} in ${options.cwd}`);
+	return new Promise<string>((resolve, reject) => {
+		const process = spawn(command, { shell: true, cwd: options.cwd, stdio: 'pipe' });
+		let output = '';
+		process.stdout.on('data', (data) => {
+			output += data;
+		});
+		process.on('exit', (code) => {
+			if (code !== 0) {
+				reject(new Error(`Command ${command} exited with code ${code}`));
+			} else {
+				resolve(output);
+			}
+		});
+	});
+}
+
+export async function gitCommitId(repositoryPath: string): Promise<string> {
+	const commitId = (await runGetOutput('git rev-parse HEAD', { cwd: repositoryPath })).trim();
+	return commitId;
+}
+
+export async function gitShallowClone(
+	targetPath: string,
+	repositoryUrl: string,
+	ref: string
+): Promise<{ commitId: string }> {
 	await mkdir(targetPath, { recursive: true });
 	const options: RunOptions = { cwd: targetPath };
 	await run('git init', options);
 	await run(`git remote add origin ${repositoryUrl}`, options);
 	await run(`git fetch --depth 1 origin ${ref}`, options);
 	await run(`git checkout ${ref}`, options);
+	const commitId = await gitCommitId(targetPath);
+	return { commitId };
 }
 
 export async function group(name: string, body: () => Promise<void>): Promise<void> {
@@ -44,12 +73,22 @@ export async function writeJsonFile(filePath: string, jsonData: unknown): Promis
 	await writeFile(filePath, JSON.stringify(jsonData, null, '\t') + '\n');
 }
 
-export function getNightlyVersion(version: string): string {
+export function getNightlyVersion(version: string, prerelease: string | undefined): string {
 	const pieces = version.split('.');
 	const minor = parseInt(pieces[1], 10);
 	const date = new Date();
 	const yyyy = date.getUTCFullYear();
 	const mm = String(date.getUTCMonth() + 1).padStart(2, '0');
 	const dd = String(date.getUTCDate()).padStart(2, '0');
-	return `0.${minor + 1}.0-dev.${yyyy}${mm}${dd}`;
+
+	prerelease = prerelease || `dev.${yyyy}${mm}${dd}`;
+	return `0.${minor + 1}.0-${prerelease}`;
+}
+
+export interface PackageJson {
+	version: string;
+	vscodeRef?: string;
+	vscodeCommitId?: string;
+	monacoCommitId?: string;
+	devDependencies: Record<string, string>;
 }

+ 1 - 1
src/basic-languages/_.contribution.ts

@@ -73,7 +73,7 @@ export function registerLanguage(def: ILang): void {
 			return mod.language;
 		}
 	});
-	languages.onLanguage(languageId, async () => {
+	languages.onLanguageEncountered(languageId, async () => {
 		const mod = await lazyLanguageLoader.load();
 		languages.setLanguageConfiguration(languageId, mod.conf);
 	});

+ 4 - 1
src/basic-languages/cpp/cpp.ts

@@ -197,6 +197,9 @@ export const language = <languages.IMonarchLanguage>{
 		'__m256',
 		'__m256d',
 		'__m256i',
+		'__m512',
+		'__m512d',
+		'__m512i',
 		'__m64',
 		'__multiple_inheritance',
 		'__newslot',
@@ -272,7 +275,7 @@ export const language = <languages.IMonarchLanguage>{
 
 	// we include these common regular expressions
 	symbols: /[=><!~?:&|+\-*\/\^%]+/,
-	escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+	escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
 	integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
 	floatsuffix: /[fFlL]?/,
 	encoding: /u|u8|U|L/,

+ 33 - 0
src/basic-languages/elixir/elixir.test.ts

@@ -303,6 +303,17 @@ testTokenization('elixir', [
 			]
 		}
 	],
+	// Sigils (multi-letter uppercase)
+	[
+		{
+			line: '~DX/foo/',
+			tokens: [
+				{ startIndex: 0, type: 'sigil.delimiter.elixir' },
+				{ startIndex: 4, type: 'sigil.elixir' },
+				{ startIndex: 7, type: 'sigil.delimiter.elixir' }
+			]
+		}
+	],
 	// Sigils (no interpolation)
 	[
 		{
@@ -314,6 +325,17 @@ testTokenization('elixir', [
 			]
 		}
 	],
+	// Sigils (multi-letter uppercase no interpolation)
+	[
+		{
+			line: '~WW/foo#{1}/',
+			tokens: [
+				{ startIndex: 0, type: 'sigil.delimiter.elixir' },
+				{ startIndex: 4, type: 'sigil.elixir' },
+				{ startIndex: 11, type: 'sigil.delimiter.elixir' }
+			]
+		}
+	],
 	// Sigils (modifiers)
 	[
 		{
@@ -325,6 +347,17 @@ testTokenization('elixir', [
 			]
 		}
 	],
+	// Sigils (multi-letter uppercase with modifiers)
+	[
+		{
+			line: '~DX/custom/az09',
+			tokens: [
+				{ startIndex: 0, type: 'sigil.delimiter.elixir' },
+				{ startIndex: 4, type: 'sigil.elixir' },
+				{ startIndex: 10, type: 'sigil.delimiter.elixir' }
+			]
+		}
+	],
 	// Module attributes
 	[
 		{

+ 10 - 9
src/basic-languages/elixir/elixir.ts

@@ -333,7 +333,8 @@ export const language = <languages.IMonarchLanguage>{
 
 		// See https://elixir-lang.org/getting-started/sigils.html
 		// Sigils allow for typing values using their textual representation.
-		// All sigils start with ~ followed by a letter indicating sigil type
+		// All sigils start with ~ followed by a letter or
+		// multi-letter uppercase starting at Elixir v1.15.0, indicating sigil type
 		// and then a delimiter pair enclosing the textual representation.
 		// Optional modifiers are allowed after the closing delimiter.
 		// For instance a regular expressions can be written as:
@@ -353,16 +354,16 @@ export const language = <languages.IMonarchLanguage>{
 
 		sigils: [
 			[/~[a-z]@sigilStartDelimiter/, { token: '@rematch', next: '@sigil.interpol' }],
-			[/~[A-Z]@sigilStartDelimiter/, { token: '@rematch', next: '@sigil.noInterpol' }]
+			[/~([A-Z]+)@sigilStartDelimiter/, { token: '@rematch', next: '@sigil.noInterpol' }]
 		],
 
 		sigil: [
-			[/~([a-zA-Z])\{/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.{.}' }],
-			[/~([a-zA-Z])\[/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.[.]' }],
-			[/~([a-zA-Z])\(/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.(.)' }],
-			[/~([a-zA-Z])\</, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.<.>' }],
+			[/~([a-z]|[A-Z]+)\{/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.{.}' }],
+			[/~([a-z]|[A-Z]+)\[/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.[.]' }],
+			[/~([a-z]|[A-Z]+)\(/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.(.)' }],
+			[/~([a-z]|[A-Z]+)\</, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.<.>' }],
 			[
-				/~([a-zA-Z])(@sigilSymmetricDelimiter)/,
+				/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,
 				{ token: '@rematch', switchTo: '@sigilStart.$S2.$1.$2.$2' }
 			]
 		],
@@ -475,7 +476,7 @@ export const language = <languages.IMonarchLanguage>{
 		// Fallback to the generic sigil by default
 		'sigilStart.interpol': [
 			[
-				/~([a-zA-Z])@sigilStartDelimiter/,
+				/~([a-z]|[A-Z]+)@sigilStartDelimiter/,
 				{
 					token: 'sigil.delimiter',
 					switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
@@ -498,7 +499,7 @@ export const language = <languages.IMonarchLanguage>{
 
 		'sigilStart.noInterpol': [
 			[
-				/~([a-zA-Z])@sigilStartDelimiter/,
+				/~([a-z]|[A-Z]+)@sigilStartDelimiter/,
 				{
 					token: 'sigil.delimiter',
 					switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'

+ 59 - 0
src/basic-languages/javascript/javascript.test.ts

@@ -39,6 +39,65 @@ testTokenization('javascript', [
 		}
 	],
 
+	// identifiers
+	[
+		{
+			line: 'foo;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.js' },
+				{ startIndex: 3, type: 'delimiter.js' }
+			]
+		}
+	],
+
+	[
+		{
+			line: 'foo() { return 1; }',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.js' },
+				{ startIndex: 3, type: 'delimiter.parenthesis.js' },
+				{ startIndex: 5, type: '' },
+				{ startIndex: 6, type: 'delimiter.bracket.js' },
+				{ startIndex: 7, type: '' },
+				{ startIndex: 8, type: 'keyword.js' },
+				{ startIndex: 14, type: '' },
+				{ startIndex: 15, type: 'number.js' },
+				{ startIndex: 16, type: 'delimiter.js' },
+				{ startIndex: 17, type: '' },
+				{ startIndex: 18, type: 'delimiter.bracket.js' }
+			]
+		}
+	],
+
+	[
+		{
+			line: '#foo;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.js' },
+				{ startIndex: 4, type: 'delimiter.js' }
+			]
+		}
+	],
+
+	[
+		{
+			line: '#foo() { return 1; }',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.js' },
+				{ startIndex: 4, type: 'delimiter.parenthesis.js' },
+				{ startIndex: 6, type: '' },
+				{ startIndex: 7, type: 'delimiter.bracket.js' },
+				{ startIndex: 8, type: '' },
+				{ startIndex: 9, type: 'keyword.js' },
+				{ startIndex: 15, type: '' },
+				{ startIndex: 16, type: 'number.js' },
+				{ startIndex: 17, type: 'delimiter.js' },
+				{ startIndex: 18, type: '' },
+				{ startIndex: 19, type: 'delimiter.bracket.js' }
+			]
+		}
+	],
+
 	// Comments - single line
 	[
 		{

+ 1 - 0
src/basic-languages/javascript/javascript.ts

@@ -43,6 +43,7 @@ export const language = <languages.IMonarchLanguage>{
 		'null',
 		'return',
 		'set',
+		'static',
 		'super',
 		'switch',
 		'symbol',

+ 1 - 1
src/basic-languages/kotlin/kotlin.contribution.ts

@@ -10,7 +10,7 @@ declare var require: any;
 
 registerLanguage({
 	id: 'kotlin',
-	extensions: ['.kt'],
+	extensions: ['.kt', '.kts'],
 	aliases: ['Kotlin', 'kotlin'],
 	mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'],
 	loader: () => {

+ 24 - 0
src/basic-languages/mdx/mdx.contribution.ts

@@ -0,0 +1,24 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { registerLanguage } from '../_.contribution';
+
+declare var AMD: any;
+declare var require: any;
+
+registerLanguage({
+	id: 'mdx',
+	extensions: ['.mdx'],
+	aliases: ['MDX', 'mdx'],
+	loader: () => {
+		if (AMD) {
+			return new Promise((resolve, reject) => {
+				require(['vs/basic-languages/mdx/mdx'], resolve, reject);
+			});
+		} else {
+			return import('./mdx');
+		}
+	}
+});

+ 171 - 0
src/basic-languages/mdx/mdx.test.ts

@@ -0,0 +1,171 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { testTokenization } from '../test/testRunner';
+
+testTokenization(
+	['mdx', 'yaml'],
+	[
+		// headers
+		[
+			{
+				line: '# header 1',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			},
+			{
+				line: '## header 2',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			},
+			{
+				line: '### header 3',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			},
+			{
+				line: '#### header 4',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			},
+			{
+				line: '##### header 5',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			},
+			{
+				line: '###### header 6',
+				tokens: [{ startIndex: 0, type: 'keyword.mdx' }]
+			}
+		],
+
+		// Lists
+		[
+			{
+				line: '- apple',
+				tokens: [
+					{ startIndex: 0, type: 'keyword.mdx' },
+					{ startIndex: 1, type: 'white.mdx' },
+					{ startIndex: 2, type: '' }
+				]
+			},
+			{
+				line: '* pear',
+				tokens: [
+					{ startIndex: 0, type: 'keyword.mdx' },
+					{ startIndex: 1, type: 'white.mdx' },
+					{ startIndex: 2, type: '' }
+				]
+			},
+			{
+				line: '+ pineapple',
+				tokens: [
+					{ startIndex: 0, type: 'keyword.mdx' },
+					{ startIndex: 1, type: 'white.mdx' },
+					{ startIndex: 2, type: '' }
+				]
+			},
+			{
+				line: '1. orange',
+				tokens: [
+					{ startIndex: 0, type: 'number.mdx' },
+					{ startIndex: 2, type: 'white.mdx' },
+					{ startIndex: 3, type: '' }
+				]
+			}
+		],
+
+		// Frontmatter
+		[
+			{
+				line: '---',
+				tokens: [{ startIndex: 0, type: 'meta.content.mdx' }]
+			},
+			{
+				line: 'frontmatter: yaml',
+				tokens: [
+					{ startIndex: 0, type: 'type.yaml' },
+					{ startIndex: 11, type: 'operators.yaml' },
+					{ startIndex: 12, type: 'white.yaml' },
+					{ startIndex: 13, type: 'string.yaml' }
+				]
+			},
+			{
+				line: '---',
+				tokens: [{ startIndex: 0, type: 'meta.content.mdx' }]
+			}
+		],
+
+		// links
+		[
+			{
+				line: '[MDX](https://mdxjs.com)',
+				tokens: [
+					{ startIndex: 0, type: '' },
+					{ startIndex: 1, type: 'type.identifier.mdx' },
+					{ startIndex: 4, type: '' },
+					{ startIndex: 6, type: 'string.link.mdx' },
+					{ startIndex: 23, type: '' }
+				]
+			},
+			{
+				line: '[monaco][monaco]',
+				tokens: [
+					{ startIndex: 0, type: '' },
+					{ startIndex: 1, type: 'type.identifier.mdx' },
+					{ startIndex: 7, type: '' },
+					{ startIndex: 9, type: 'type.identifier.mdx' },
+					{ startIndex: 15, type: '' }
+				]
+			},
+			{
+				line: '[monaco][]',
+				tokens: [
+					{ startIndex: 0, type: '' },
+					{ startIndex: 1, type: 'type.identifier.mdx' },
+					{ startIndex: 9, type: '' }
+				]
+			},
+			{
+				line: '[monaco]',
+				tokens: [
+					{ startIndex: 0, type: '' },
+					{ startIndex: 1, type: 'type.identifier.mdx' },
+					{ startIndex: 7, type: '' }
+				]
+			},
+			{
+				line: '[monaco]: https://github.com/microsoft/monaco-editor',
+				tokens: [
+					{ startIndex: 0, type: '' },
+					{ startIndex: 1, type: 'type.identifier.mdx' },
+					{ startIndex: 7, type: '' },
+					{ startIndex: 10, type: 'string.link.mdx' }
+				]
+			}
+		],
+
+		// JSX
+		[
+			{
+				line: '<div>**child**</div>',
+				tokens: [
+					{ startIndex: 0, type: 'type.identifier.mdx' },
+					// This is incorrect. MDX children that start on the same line are JSX, not markdown
+					{ startIndex: 5, type: 'strong.mdx' },
+					{ startIndex: 14, type: 'type.identifier.mdx' }
+				]
+			},
+			{
+				line: '{console.log("This is JavaScript")}',
+				tokens: [
+					{ startIndex: 0, type: 'delimiter.bracket.mdx' },
+					{ startIndex: 1, type: 'identifier.js' },
+					{ startIndex: 8, type: 'delimiter.js' },
+					{ startIndex: 9, type: 'identifier.js' },
+					{ startIndex: 12, type: 'delimiter.parenthesis.js' },
+					{ startIndex: 13, type: 'string.js' },
+					{ startIndex: 33, type: 'delimiter.parenthesis.js' },
+					{ startIndex: 34, type: 'delimiter.bracket.mdx' }
+				]
+			}
+		]
+	]
+);

+ 163 - 0
src/basic-languages/mdx/mdx.ts

@@ -0,0 +1,163 @@
+/*---------------------------------------------------------------------------------------------
+ *	Copyright (c) Microsoft Corporation. All rights reserved.
+ *	Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { languages } from '../../fillers/monaco-editor-core';
+
+export const conf: languages.LanguageConfiguration = {
+	comments: {
+		blockComment: ['{/*', '*/}']
+	},
+	brackets: [['{', '}']],
+	autoClosingPairs: [
+		{ open: '"', close: '"' },
+		{ open: "'", close: "'" },
+		{ open: '“', close: '”' },
+		{ open: '‘', close: '’' },
+		{ open: '`', close: '`' },
+		{ open: '{', close: '}' },
+		{ open: '(', close: ')' },
+		{ open: '_', close: '_' },
+		{ open: '**', close: '**' },
+		{ open: '<', close: '>' }
+	],
+	onEnterRules: [
+		{
+			beforeText: /^\s*- .+/,
+			action: { indentAction: languages.IndentAction.None, appendText: '- ' }
+		},
+		{
+			beforeText: /^\s*\+ .+/,
+			action: { indentAction: languages.IndentAction.None, appendText: '+ ' }
+		},
+		{
+			beforeText: /^\s*\* .+/,
+			action: { indentAction: languages.IndentAction.None, appendText: '* ' }
+		},
+		{
+			beforeText: /^> /,
+			action: { indentAction: languages.IndentAction.None, appendText: '> ' }
+		},
+		{
+			beforeText: /<\w+/,
+			action: { indentAction: languages.IndentAction.Indent }
+		},
+		{
+			beforeText: /\s+>\s*$/,
+			action: { indentAction: languages.IndentAction.Indent }
+		},
+		{
+			beforeText: /<\/\w+>/,
+			action: { indentAction: languages.IndentAction.Outdent }
+		},
+		...Array.from({ length: 100 }, (_, index) => ({
+			beforeText: new RegExp(`^${index}\\. .+`),
+			action: { indentAction: languages.IndentAction.None, appendText: `${index + 1}. ` }
+		}))
+	]
+};
+
+export const language = <languages.IMonarchLanguage>{
+	defaultToken: '',
+	tokenPostfix: '.mdx',
+	control: /[!#()*+.[\\\]_`{}\-]/,
+	escapes: /\\@control/,
+
+	tokenizer: {
+		root: [
+			[/^---$/, { token: 'meta.content', next: '@frontmatter', nextEmbedded: 'yaml' }],
+			[/^\s*import/, { token: 'keyword', next: '@import', nextEmbedded: 'js' }],
+			[/^\s*export/, { token: 'keyword', next: '@export', nextEmbedded: 'js' }],
+			[/<\w+/, { token: 'type.identifier', next: '@jsx' }],
+			[/<\/?\w+>/, 'type.identifier'],
+			[
+				/^(\s*)(>*\s*)(#{1,6}\s)/,
+				[{ token: 'white' }, { token: 'comment' }, { token: 'keyword', next: '@header' }]
+			],
+			[/^(\s*)(>*\s*)([*+-])(\s+)/, ['white', 'comment', 'keyword', 'white']],
+			[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ['white', 'comment', 'number', 'white']],
+			[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ['white', 'comment', 'number', 'white']],
+			[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/, ['white', 'comment', 'keyword']],
+			[/`{3,}(\s.*)?$/, { token: 'string', next: '@codeblock_backtick' }],
+			[/~{3,}(\s.*)?$/, { token: 'string', next: '@codeblock_tilde' }],
+			[
+				/`{3,}(\S+).*$/,
+				{ token: 'string', next: '@codeblock_highlight_backtick', nextEmbedded: '$1' }
+			],
+			[
+				/~{3,}(\S+).*$/,
+				{ token: 'string', next: '@codeblock_highlight_tilde', nextEmbedded: '$1' }
+			],
+			[/^(\s*)(-{4,})$/, ['white', 'comment']],
+			[/^(\s*)(>+)/, ['white', 'comment']],
+			{ include: 'content' }
+		],
+		content: [
+			[
+				/(\[)(.+)(]\()(.+)(\s+".*")(\))/,
+				['', 'string.link', '', 'type.identifier', 'string.link', '']
+			],
+			[/(\[)(.+)(]\()(.+)(\))/, ['', 'type.identifier', '', 'string.link', '']],
+			[/(\[)(.+)(]\[)(.+)(])/, ['', 'type.identifier', '', 'type.identifier', '']],
+			[/(\[)(.+)(]:\s+)(\S*)/, ['', 'type.identifier', '', 'string.link']],
+			[/(\[)(.+)(])/, ['', 'type.identifier', '']],
+			[/`.*`/, 'variable.source'],
+			[/_/, { token: 'emphasis', next: '@emphasis_underscore' }],
+			[/\*(?!\*)/, { token: 'emphasis', next: '@emphasis_asterisk' }],
+			[/\*\*/, { token: 'strong', next: '@strong' }],
+			[/{/, { token: 'delimiter.bracket', next: '@expression', nextEmbedded: 'js' }]
+		],
+		import: [[/'\s*(;|$)/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }]],
+		expression: [
+			[/{/, { token: 'delimiter.bracket', next: '@expression' }],
+			[/}/, { token: 'delimiter.bracket', next: '@pop', nextEmbedded: '@pop' }]
+		],
+		export: [[/^\s*$/, { token: 'delimiter.bracket', next: '@pop', nextEmbedded: '@pop' }]],
+		jsx: [
+			[/\s+/, ''],
+			[/(\w+)(=)("(?:[^"\\]|\\.)*")/, ['attribute.name', 'operator', 'string']],
+			[/(\w+)(=)('(?:[^'\\]|\\.)*')/, ['attribute.name', 'operator', 'string']],
+			[/(\w+(?=\s|>|={|$))/, ['attribute.name']],
+			[/={/, { token: 'delimiter.bracket', next: '@expression', nextEmbedded: 'js' }],
+			[/>/, { token: 'type.identifier', next: '@pop' }]
+		],
+		header: [
+			[/.$/, { token: 'keyword', next: '@pop' }],
+			{ include: 'content' },
+			[/./, { token: 'keyword' }]
+		],
+		strong: [
+			[/\*\*/, { token: 'strong', next: '@pop' }],
+			{ include: 'content' },
+			[/./, { token: 'strong' }]
+		],
+		emphasis_underscore: [
+			[/_/, { token: 'emphasis', next: '@pop' }],
+			{ include: 'content' },
+			[/./, { token: 'emphasis' }]
+		],
+		emphasis_asterisk: [
+			[/\*(?!\*)/, { token: 'emphasis', next: '@pop' }],
+			{ include: 'content' },
+			[/./, { token: 'emphasis' }]
+		],
+		frontmatter: [[/^---$/, { token: 'meta.content', nextEmbedded: '@pop', next: '@pop' }]],
+		codeblock_highlight_backtick: [
+			[/\s*`{3,}\s*$/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }],
+			[/.*$/, 'variable.source']
+		],
+		codeblock_highlight_tilde: [
+			[/\s*~{3,}\s*$/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }],
+			[/.*$/, 'variable.source']
+		],
+		codeblock_backtick: [
+			[/\s*`{3,}\s*$/, { token: 'string', next: '@pop' }],
+			[/.*$/, 'variable.source']
+		],
+		codeblock_tilde: [
+			[/\s*~{3,}\s*$/, { token: 'string', next: '@pop' }],
+			[/.*$/, 'variable.source']
+		]
+	}
+};

+ 2 - 0
src/basic-languages/monaco.contribution.ts

@@ -39,6 +39,7 @@ import './lua/lua.contribution';
 import './liquid/liquid.contribution';
 import './m3/m3.contribution';
 import './markdown/markdown.contribution';
+import './mdx/mdx.contribution';
 import './mips/mips.contribution';
 import './msdax/msdax.contribution';
 import './mysql/mysql.contribution';
@@ -79,5 +80,6 @@ import './tcl/tcl.contribution';
 import './twig/twig.contribution';
 import './typescript/typescript.contribution';
 import './vb/vb.contribution';
+import './wgsl/wgsl.contribution';
 import './xml/xml.contribution';
 import './yaml/yaml.contribution';

+ 1 - 0
src/basic-languages/mysql/mysql.ts

@@ -862,6 +862,7 @@ export const language = <languages.IMonarchLanguage>{
 			[/"/, { token: 'string.double', next: '@stringDouble' }]
 		],
 		string: [
+			[/\\'/, 'string'],
 			[/[^']+/, 'string'],
 			[/''/, 'string'],
 			[/'/, { token: 'string', next: '@pop' }]

+ 1 - 1
src/basic-languages/perl/perl.contribution.ts

@@ -10,7 +10,7 @@ declare var require: any;
 
 registerLanguage({
 	id: 'perl',
-	extensions: ['.pl'],
+	extensions: ['.pl', '.pm'],
 	aliases: ['Perl', 'pl'],
 	loader: () => {
 		if (AMD) {

+ 4 - 0
src/basic-languages/pgsql/pgsql.ts

@@ -627,11 +627,15 @@ export const language = <languages.IMonarchLanguage>{
 		'range_intersect_agg',
 		'range_merge',
 		'rank',
+		'regexp_count',
+		'regexp_instr',
+		'regexp_like',
 		'regexp_match',
 		'regexp_matches',
 		'regexp_replace',
 		'regexp_split_to_array',
 		'regexp_split_to_table',
+		'regexp_substr',
 		'regr_avgx',
 		'regr_avgy',
 		'regr_count',

+ 1 - 1
src/basic-languages/typescript/typescript.contribution.ts

@@ -10,7 +10,7 @@ declare var require: any;
 
 registerLanguage({
 	id: 'typescript',
-	extensions: ['.ts', '.tsx'],
+	extensions: ['.ts', '.tsx', '.cts', '.mts'],
 	aliases: ['TypeScript', 'ts', 'typescript'],
 	mimetypes: ['text/typescript'],
 	loader: (): Promise<any> => {

+ 59 - 0
src/basic-languages/typescript/typescript.test.ts

@@ -39,6 +39,65 @@ testTokenization('typescript', [
 		}
 	],
 
+	// identifiers
+	[
+		{
+			line: 'foo;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.ts' },
+				{ startIndex: 3, type: 'delimiter.ts' }
+			]
+		}
+	],
+
+	[
+		{
+			line: 'foo() { return 1; }',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.ts' },
+				{ startIndex: 3, type: 'delimiter.parenthesis.ts' },
+				{ startIndex: 5, type: '' },
+				{ startIndex: 6, type: 'delimiter.bracket.ts' },
+				{ startIndex: 7, type: '' },
+				{ startIndex: 8, type: 'keyword.ts' },
+				{ startIndex: 14, type: '' },
+				{ startIndex: 15, type: 'number.ts' },
+				{ startIndex: 16, type: 'delimiter.ts' },
+				{ startIndex: 17, type: '' },
+				{ startIndex: 18, type: 'delimiter.bracket.ts' }
+			]
+		}
+	],
+
+	[
+		{
+			line: '#foo;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.ts' },
+				{ startIndex: 4, type: 'delimiter.ts' }
+			]
+		}
+	],
+
+	[
+		{
+			line: '#foo() { return 1; }',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.ts' },
+				{ startIndex: 4, type: 'delimiter.parenthesis.ts' },
+				{ startIndex: 6, type: '' },
+				{ startIndex: 7, type: 'delimiter.bracket.ts' },
+				{ startIndex: 8, type: '' },
+				{ startIndex: 9, type: 'keyword.ts' },
+				{ startIndex: 15, type: '' },
+				{ startIndex: 16, type: 'number.ts' },
+				{ startIndex: 17, type: 'delimiter.ts' },
+				{ startIndex: 18, type: '' },
+				{ startIndex: 19, type: 'delimiter.bracket.ts' }
+			]
+		}
+	],
+
 	// Comments - single line
 	[
 		{

+ 2 - 1
src/basic-languages/typescript/typescript.ts

@@ -137,6 +137,7 @@ export const language = {
 		'require',
 		'global',
 		'return',
+		'satisfies',
 		'set',
 		'static',
 		'string',
@@ -226,7 +227,7 @@ export const language = {
 		common: [
 			// identifiers and keywords
 			[
-				/[a-z_$][\w$]*/,
+				/#?[a-z_$][\w$]*/,
 				{
 					cases: {
 						'@keywords': 'keyword',

+ 24 - 0
src/basic-languages/wgsl/wgsl.contribution.ts

@@ -0,0 +1,24 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { registerLanguage } from '../_.contribution';
+
+declare var AMD: any;
+declare var require: any;
+
+registerLanguage({
+	id: 'wgsl',
+	extensions: ['.wgsl'],
+	aliases: ['WebGPU Shading Language', 'WGSL', 'wgsl'],
+	loader: () => {
+		if (AMD) {
+			return new Promise((resolve, reject) => {
+				require(['vs/basic-languages/wgsl/wgsl'], resolve, reject);
+			});
+		} else {
+			return import('./wgsl');
+		}
+	}
+});

+ 3915 - 0
src/basic-languages/wgsl/wgsl.test.ts

@@ -0,0 +1,3915 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation, Google LLC. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { testTokenization, ITestItem } from '../test/testRunner';
+
+const cases: ITestItem[][] = [
+	// address space
+	[
+		{
+			line: 'alias a=ptr<function,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'delimiter.wgsl' },
+				{ startIndex: 21, type: 'variable.predefined.wgsl' },
+				{ startIndex: 24, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias b=ptr<private,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias c=ptr<workgroup,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' },
+				{ startIndex: 22, type: 'variable.predefined.wgsl' },
+				{ startIndex: 25, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias d=ptr<uniform,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias e=ptr<storage,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// attribute
+	[
+		{
+			line: '@id(0) override x:i32 = 1;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 3, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 4, type: 'number.wgsl' },
+				{ startIndex: 5, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'keyword.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'identifier.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'operator.wgsl' },
+				{ startIndex: 23, type: 'white.wgsl' },
+				{ startIndex: 24, type: 'number.wgsl' },
+				{ startIndex: 25, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@ id(1) override y:i32 = 2;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'annotation.wgsl' },
+				{ startIndex: 4, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'keyword.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'identifier.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' },
+				{ startIndex: 19, type: 'variable.predefined.wgsl' },
+				{ startIndex: 22, type: 'white.wgsl' },
+				{ startIndex: 23, type: 'operator.wgsl' },
+				{ startIndex: 24, type: 'white.wgsl' },
+				{ startIndex: 25, type: 'number.wgsl' },
+				{ startIndex: 26, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@//comment',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{
+			line: 'id(1) override z:i32 = 3;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 2, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 3, type: 'number.wgsl' },
+				{ startIndex: 4, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'keyword.wgsl' },
+				{ startIndex: 14, type: 'white.wgsl' },
+				{ startIndex: 15, type: 'identifier.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'white.wgsl' },
+				{ startIndex: 21, type: 'operator.wgsl' },
+				{ startIndex: 22, type: 'white.wgsl' },
+				{ startIndex: 23, type: 'number.wgsl' },
+				{ startIndex: 24, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@must_use fn foo() -> i32 { return 32; }',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'keyword.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'identifier.wgsl' },
+				{ startIndex: 16, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 18, type: 'white.wgsl' },
+				{ startIndex: 19, type: 'operator.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'variable.predefined.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'delimiter.curly.wgsl' },
+				{ startIndex: 27, type: 'white.wgsl' },
+				{ startIndex: 28, type: 'keyword.wgsl' },
+				{ startIndex: 34, type: 'white.wgsl' },
+				{ startIndex: 35, type: 'number.wgsl' },
+				{ startIndex: 37, type: 'delimiter.wgsl' },
+				{ startIndex: 38, type: 'white.wgsl' },
+				{ startIndex: 39, type: 'delimiter.curly.wgsl' }
+			]
+		}
+	],
+	// block comment
+	[
+		{
+			line: ' /**/',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{
+			line: ' /*block with newline',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{ line: '  */', tokens: [{ startIndex: 0, type: 'comment.wgsl' }] },
+		{
+			line: ' /*block with line',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{ line: ' ending comment//  */', tokens: [{ startIndex: 0, type: 'comment.wgsl' }] },
+		{
+			line: ' /* nested /*',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{ line: '  */', tokens: [{ startIndex: 0, type: 'comment.wgsl' }] },
+		{ line: '  */', tokens: [{ startIndex: 0, type: 'comment.wgsl' }] }
+	],
+	// bool types
+	[
+		{
+			line: 'alias boolean=bool;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'variable.predefined.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias bvec2=vec2<bool>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias bvec3=vec3<bool>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias bvec4=vec4<bool>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// brackets
+	[
+		{
+			line: 'const one = array(1)[0];',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 18, type: 'number.wgsl' },
+				{ startIndex: 19, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 20, type: 'delimiter.square.wgsl' },
+				{ startIndex: 21, type: 'number.wgsl' },
+				{ startIndex: 22, type: 'delimiter.square.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'fn none() {}',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 2, type: 'white.wgsl' },
+				{ startIndex: 3, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'delimiter.curly.wgsl' }
+			]
+		}
+	],
+	// const numbers
+	[
+		{
+			line: 'const a = 0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.wgsl' },
+				{ startIndex: 11, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const au = 0u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ai = 0i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const b = 12345;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const bu = 12345u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const bi= 12345i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const c = 0x0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const cu = 0x0u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ci = 0x0i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const d = 0x12345;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const di = 0x12345i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const du = 0x12345u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const eh = 0h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ef = 0f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const f = 1.;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 12, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const fh = 1.h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ff = 1.f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const g = .1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 12, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const gh = .1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const gf = .1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const g = 1e1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const gh = 1e1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const gf = 1e1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const h = 1e+1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const hh = 1e+1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const hf = 1e+1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const i = 1e-1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ih = 1e-1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const if = 1e-1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'keyword.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const j = 1.0e+1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const jh = 1.0e+1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const jf= 1.0e+1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const k = 1.0e-1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const kh = 1.0e-1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.float.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const kf= 1.0e-1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.float.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const l = 0x1p1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const lh = 0x1p1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const lf = 0x1p1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const m = 0x1p+1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const mh = 0x1p+1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const mf = 0x1p+1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const n = 0x1p-1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const nh = 0x1p-1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const nf = 0x1p-1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const oo = 0x1.p1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ooh = 0x1.p1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.hex.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const oof = 0x1.p1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.hex.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const p = 0x.1p1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'operator.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'number.hex.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const ph = 0x.1p1h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const pf = 0x.1p1f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.hex.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// depth texture
+	[
+		{
+			line: '@group(0) @binding(1) var texture_depth_2d;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 42, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(2) var texture_depth_2d_array;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 48, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(4) var texture_depth_cube;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(5) var texture_depth_cube_array;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 50, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(5) var texture_depth_multisampled_2d;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// directive
+	[
+		{
+			line: 'enable f16;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'meta.content.wgsl' },
+				{ startIndex: 10, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'requires v1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'meta.content.wgsl' },
+				{ startIndex: 11, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'diagnostic(error,derivative_uniformity);',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 10, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 11, type: 'meta.content.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' },
+				{ startIndex: 17, type: 'meta.content.wgsl' },
+				{ startIndex: 38, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 39, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'diagnostic(warning,derivative_uniformity);',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 10, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 11, type: 'meta.content.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' },
+				{ startIndex: 19, type: 'meta.content.wgsl' },
+				{ startIndex: 40, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 41, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'diagnostic(off,derivative_uniformity);',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 10, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 11, type: 'meta.content.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' },
+				{ startIndex: 15, type: 'meta.content.wgsl' },
+				{ startIndex: 36, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 37, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'diagnostic(info,derivative_uniformity);',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 10, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 11, type: 'meta.content.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' },
+				{ startIndex: 16, type: 'meta.content.wgsl' },
+				{ startIndex: 37, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 38, type: 'delimiter.wgsl' }
+			]
+		},
+		{ line: '', tokens: [] },
+		{
+			line: '@diagnostic(off,derviative_uniformity) fn main() {}',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 11, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 12, type: 'identifier.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' },
+				{ startIndex: 16, type: 'identifier.wgsl' },
+				{ startIndex: 37, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 38, type: 'white.wgsl' },
+				{ startIndex: 39, type: 'keyword.wgsl' },
+				{ startIndex: 41, type: 'white.wgsl' },
+				{ startIndex: 42, type: 'identifier.wgsl' },
+				{ startIndex: 46, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 48, type: 'white.wgsl' },
+				{ startIndex: 49, type: 'delimiter.curly.wgsl' }
+			]
+		}
+	],
+	// external texture
+	[
+		{
+			line: '@group(0) @binding(5) var texture_external;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 42, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// keywords
+	[
+		{ line: 'alias', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'break', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'case', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'const', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'const_assert', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'continue', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'continuing', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'default', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'diagnostic', tokens: [{ startIndex: 0, type: 'keyword.wgsl' }] },
+		{ line: 'discard', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'else', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'enable', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'false', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'fn', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'for', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'if', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'let', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'loop', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'override', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'requires', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'return', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'struct', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'switch', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'true', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'var', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] },
+		{ line: 'while', tokens: [{ startIndex: 0, type: 'meta.content.wgsl' }] }
+	],
+	// line comment
+	[
+		{
+			line: '  // this is a line-ending comment',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'comment.wgsl' }
+			]
+		},
+		{
+			line: ' //* embed a bock comment start, after a space',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 1, type: 'comment.wgsl' }
+			]
+		},
+		{
+			line: '// /* embed a bock comment start, v2',
+			tokens: [{ startIndex: 0, type: 'comment.wgsl' }]
+		}
+	],
+	// multisampled texture
+	[
+		{
+			line: '@group(0) @binding(5) var texture_multisampled_2d<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 49, type: 'operator.wgsl' },
+				{ startIndex: 50, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// numeric types
+	[
+		{
+			line: 'enable f16;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'meta.content.wgsl' },
+				{ startIndex: 10, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias int=i32;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uint=u32;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias float=f32;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias half=f16;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec2=vec2i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec2=vec2u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias vec2=vec2f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec3=vec3i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec3=vec3u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias vec3=vec3f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec4=vec4i;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec4=vec4u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec2_=vec2<i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec2_=vec2<u32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias vec2_=vec2<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec3_=vec3<i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec3_=vec3<u32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias vec3_=vec3<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias ivec4_=vec4<i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias uvec4_=vec4<u32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias vec4_=vec4<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias hvec2=vec2h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias hvec3=vec3h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias hvec4=vec4h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias hvec4_=vec4<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m22=mat2x2f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m23=mat2x3f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m24=mat2x4f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m32=mat3x2f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m33=mat3x3f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m34=mat3x4f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m42=mat4x2f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m43=mat4x3f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m44=mat4x4f;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m22_=mat2x2<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m23_=mat2x3<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m24_=mat2x4<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m32_=mat3x2<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m33_=mat3x3<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m34_=mat3x4<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m42_=mat4x2<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m43_=mat4x3<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m44_=mat4x4<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m22=mat2x2h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias m23=mat2x3h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h24=mat2x4h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h32=mat3x2h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h33=mat3x3h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h34=mat3x4h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h42=mat4x2h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h43=mat4x3h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h44=mat4x4h;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h22_=mat2x2<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h23_=mat2x3<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h24_=mat2x4<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h32_=mat3x2<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h33_=mat3x3<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h34_=mat3x4<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h42_=mat4x2<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h43_=mat4x3<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias h44_=mat4x4<f16>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// operators
+	[
+		{
+			line: 'const add = 0+1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const sub = 0-1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const mult = 1*0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'number.wgsl' },
+				{ startIndex: 14, type: 'operator.wgsl' },
+				{ startIndex: 15, type: 'number.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const div = 1/0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const rem = 2%1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const xor = 1^2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'number.wgsl' },
+				{ startIndex: 13, type: 'delimiter.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const or = 1|2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'operator.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'number.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'number.wgsl' },
+				{ startIndex: 14, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const not = !false;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'operator.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'delimiter.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const complement = ~1u;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'white.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' },
+				{ startIndex: 20, type: 'number.wgsl' },
+				{ startIndex: 22, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const less = 1<0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'number.wgsl' },
+				{ startIndex: 14, type: 'operator.wgsl' },
+				{ startIndex: 15, type: 'number.wgsl' },
+				{ startIndex: 16, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const lesseq = 1<=0;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'white.wgsl' },
+				{ startIndex: 15, type: 'number.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'number.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const equal = 1==2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'white.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'number.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const greater = 1>2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 13, type: 'white.wgsl' },
+				{ startIndex: 14, type: 'operator.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'number.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'number.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const greatereq = 1>=2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'white.wgsl' },
+				{ startIndex: 18, type: 'number.wgsl' },
+				{ startIndex: 19, type: 'operator.wgsl' },
+				{ startIndex: 21, type: 'number.wgsl' },
+				{ startIndex: 22, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const noteq = 1!=2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'white.wgsl' },
+				{ startIndex: 14, type: 'number.wgsl' },
+				{ startIndex: 15, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'number.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const leftshift = 1<<2;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'operator.wgsl' },
+				{ startIndex: 17, type: 'white.wgsl' },
+				{ startIndex: 18, type: 'number.wgsl' },
+				{ startIndex: 19, type: 'operator.wgsl' },
+				{ startIndex: 21, type: 'number.wgsl' },
+				{ startIndex: 22, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'const rightshift = 2>>1;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'operator.wgsl' },
+				{ startIndex: 18, type: 'white.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'operator.wgsl' },
+				{ startIndex: 22, type: 'number.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'fn arith() -> i32 {',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 2, type: 'white.wgsl' },
+				{ startIndex: 3, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 13, type: 'white.wgsl' },
+				{ startIndex: 14, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'white.wgsl' },
+				{ startIndex: 18, type: 'delimiter.curly.wgsl' }
+			]
+		},
+		{
+			line: 'var a: i32;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 3, type: 'white.wgsl' },
+				{ startIndex: 4, type: 'identifier.wgsl' },
+				{ startIndex: 5, type: 'delimiter.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a += 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a -= 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a *= 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a /= 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a %= 2;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a ^= 2;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a &= 2;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a |= 2;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'number.wgsl' },
+				{ startIndex: 6, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a <<= 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'number.wgsl' },
+				{ startIndex: 7, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a >>= 1;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'operator.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'number.wgsl' },
+				{ startIndex: 7, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a++;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'a--;',
+			tokens: [
+				{ startIndex: 0, type: 'identifier.wgsl' },
+				{ startIndex: 1, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'let b = true&&false;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 3, type: 'white.wgsl' },
+				{ startIndex: 4, type: 'identifier.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'operator.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'let c = true||false;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 3, type: 'white.wgsl' },
+				{ startIndex: 4, type: 'identifier.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'operator.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'return a;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'delimiter.wgsl' }
+			]
+		},
+		{ line: '}', tokens: [{ startIndex: 0, type: 'delimiter.curly.wgsl' }] }
+	],
+	// predeclared
+	[
+		{
+			line: 'read write read_write',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'function private workgroup uniform storage',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 26, type: 'white.wgsl' },
+				{ startIndex: 27, type: 'variable.predefined.wgsl' },
+				{ startIndex: 34, type: 'white.wgsl' },
+				{ startIndex: 35, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'perspective linear flat',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 18, type: 'white.wgsl' },
+				{ startIndex: 19, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'center centroid sample',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 6, type: 'white.wgsl' },
+				{ startIndex: 7, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'vertex_index instance_index position front_facing frag_depth',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 27, type: 'white.wgsl' },
+				{ startIndex: 28, type: 'variable.predefined.wgsl' },
+				{ startIndex: 36, type: 'white.wgsl' },
+				{ startIndex: 37, type: 'variable.predefined.wgsl' },
+				{ startIndex: 49, type: 'white.wgsl' },
+				{ startIndex: 50, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'local_invocation_id local_invocation_index',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'white.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'global_invocation_id workgroup_id num_workgroups',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'white.wgsl' },
+				{ startIndex: 21, type: 'variable.predefined.wgsl' },
+				{ startIndex: 33, type: 'white.wgsl' },
+				{ startIndex: 34, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'sample_index sample_mask',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{ line: 'rgba8unorm', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba8snorm', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba8uint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba8sint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba16uint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba16sint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba16float', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'r32uint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'r32sint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'r32float', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rg32uint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rg32sint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rg32float', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba32uint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba32sint', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'rgba32float', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'bgra8unorm', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: '', tokens: [] },
+		{ line: 'bool', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'f16', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'f32', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'i32', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{
+			line: 'sampler sampler_comparison',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'texture_depth_2d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_depth_2d_array',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_depth_cube',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_depth_cube_array',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_depth_multisampled_2d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_external',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_external',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{ line: 'u32', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: '', tokens: [] },
+		{ line: 'array', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'atomic', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat2x2', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat2x3', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat2x4', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat3x2', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat3x3', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat3x4', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat4x2', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat4x3', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'mat4x4', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'ptr', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'texture_1d', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'texture_2d', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{
+			line: 'texture_2d_array',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{ line: 'texture_3d', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'texture_cube', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{
+			line: 'texture_cube_array',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_multisampled_2d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_storage_1d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_storage_2d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_storage_2d_array',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{
+			line: 'texture_storage_3d',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		},
+		{ line: 'vec2', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'vec3', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: 'vec4', tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }] },
+		{ line: '', tokens: [] },
+		{
+			line: 'vec2i vec3i vec4i',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'vec2u vec3u vec4u',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'vec2f vec3f vec4f',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'vec2h vec3h vec4h',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat2x2f mat2x3f mat2x4f',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat3x2f mat3x3f mat3x4f',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat4x2f mat4x3f mat4x4f',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat2x2h mat2x3h mat2x4h',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat3x2h mat3x3h mat3x4h',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'mat4x2h mat4x3h mat4x4h',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{ line: '', tokens: [] },
+		{
+			line: 'bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' },
+				{ startIndex: 22, type: 'white.wgsl' },
+				{ startIndex: 23, type: 'variable.predefined.wgsl' },
+				{ startIndex: 34, type: 'white.wgsl' },
+				{ startIndex: 35, type: 'variable.predefined.wgsl' },
+				{ startIndex: 38, type: 'white.wgsl' },
+				{ startIndex: 39, type: 'variable.predefined.wgsl' },
+				{ startIndex: 43, type: 'white.wgsl' },
+				{ startIndex: 44, type: 'variable.predefined.wgsl' },
+				{ startIndex: 49, type: 'white.wgsl' },
+				{ startIndex: 50, type: 'variable.predefined.wgsl' },
+				{ startIndex: 54, type: 'white.wgsl' },
+				{ startIndex: 55, type: 'variable.predefined.wgsl' },
+				{ startIndex: 60, type: 'white.wgsl' },
+				{ startIndex: 61, type: 'variable.predefined.wgsl' },
+				{ startIndex: 65, type: 'white.wgsl' },
+				{ startIndex: 66, type: 'variable.predefined.wgsl' },
+				{ startIndex: 71, type: 'white.wgsl' },
+				{ startIndex: 72, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 4, type: 'white.wgsl' },
+				{ startIndex: 5, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 14, type: 'white.wgsl' },
+				{ startIndex: 15, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'white.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' },
+				{ startIndex: 37, type: 'white.wgsl' },
+				{ startIndex: 38, type: 'variable.predefined.wgsl' },
+				{ startIndex: 50, type: 'white.wgsl' },
+				{ startIndex: 51, type: 'variable.predefined.wgsl' },
+				{ startIndex: 69, type: 'white.wgsl' },
+				{ startIndex: 70, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 7, type: 'white.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 19, type: 'white.wgsl' },
+				{ startIndex: 20, type: 'variable.predefined.wgsl' },
+				{ startIndex: 28, type: 'white.wgsl' },
+				{ startIndex: 29, type: 'variable.predefined.wgsl' },
+				{ startIndex: 32, type: 'white.wgsl' },
+				{ startIndex: 33, type: 'variable.predefined.wgsl' },
+				{ startIndex: 36, type: 'white.wgsl' },
+				{ startIndex: 37, type: 'variable.predefined.wgsl' },
+				{ startIndex: 41, type: 'white.wgsl' },
+				{ startIndex: 42, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'white.wgsl' },
+				{ startIndex: 54, type: 'variable.predefined.wgsl' },
+				{ startIndex: 65, type: 'white.wgsl' },
+				{ startIndex: 66, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 22, type: 'white.wgsl' },
+				{ startIndex: 23, type: 'variable.predefined.wgsl' },
+				{ startIndex: 26, type: 'white.wgsl' },
+				{ startIndex: 27, type: 'variable.predefined.wgsl' },
+				{ startIndex: 32, type: 'white.wgsl' },
+				{ startIndex: 33, type: 'variable.predefined.wgsl' },
+				{ startIndex: 38, type: 'white.wgsl' },
+				{ startIndex: 39, type: 'variable.predefined.wgsl' },
+				{ startIndex: 50, type: 'white.wgsl' },
+				{ startIndex: 51, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'white.wgsl' },
+				{ startIndex: 63, type: 'variable.predefined.wgsl' },
+				{ startIndex: 68, type: 'white.wgsl' },
+				{ startIndex: 69, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 3, type: 'white.wgsl' },
+				{ startIndex: 4, type: 'variable.predefined.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'white.wgsl' },
+				{ startIndex: 21, type: 'variable.predefined.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 35, type: 'white.wgsl' },
+				{ startIndex: 36, type: 'variable.predefined.wgsl' },
+				{ startIndex: 39, type: 'white.wgsl' },
+				{ startIndex: 40, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'white.wgsl' },
+				{ startIndex: 54, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'white.wgsl' },
+				{ startIndex: 62, type: 'variable.predefined.wgsl' },
+				{ startIndex: 69, type: 'white.wgsl' },
+				{ startIndex: 70, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'white.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'white.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 26, type: 'white.wgsl' },
+				{ startIndex: 27, type: 'variable.predefined.wgsl' },
+				{ startIndex: 31, type: 'white.wgsl' },
+				{ startIndex: 32, type: 'variable.predefined.wgsl' },
+				{ startIndex: 35, type: 'white.wgsl' },
+				{ startIndex: 36, type: 'variable.predefined.wgsl' },
+				{ startIndex: 40, type: 'white.wgsl' },
+				{ startIndex: 41, type: 'variable.predefined.wgsl' },
+				{ startIndex: 51, type: 'white.wgsl' },
+				{ startIndex: 52, type: 'variable.predefined.wgsl' },
+				{ startIndex: 56, type: 'white.wgsl' },
+				{ startIndex: 57, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'white.wgsl' },
+				{ startIndex: 62, type: 'variable.predefined.wgsl' },
+				{ startIndex: 65, type: 'white.wgsl' },
+				{ startIndex: 66, type: 'variable.predefined.wgsl' },
+				{ startIndex: 70, type: 'white.wgsl' },
+				{ startIndex: 71, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'variable.predefined.wgsl' },
+				{ startIndex: 10, type: 'white.wgsl' },
+				{ startIndex: 11, type: 'variable.predefined.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'variable.predefined.wgsl' },
+				{ startIndex: 30, type: 'white.wgsl' },
+				{ startIndex: 31, type: 'variable.predefined.wgsl' },
+				{ startIndex: 35, type: 'white.wgsl' },
+				{ startIndex: 36, type: 'variable.predefined.wgsl' },
+				{ startIndex: 46, type: 'white.wgsl' },
+				{ startIndex: 47, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'white.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'white.wgsl' },
+				{ startIndex: 63, type: 'variable.predefined.wgsl' },
+				{ startIndex: 75, type: 'white.wgsl' },
+				{ startIndex: 76, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'white.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 31, type: 'white.wgsl' },
+				{ startIndex: 32, type: 'variable.predefined.wgsl' },
+				{ startIndex: 52, type: 'white.wgsl' },
+				{ startIndex: 53, type: 'variable.predefined.wgsl' },
+				{ startIndex: 64, type: 'white.wgsl' },
+				{ startIndex: 65, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 16, type: 'white.wgsl' },
+				{ startIndex: 17, type: 'variable.predefined.wgsl' },
+				{ startIndex: 34, type: 'white.wgsl' },
+				{ startIndex: 35, type: 'variable.predefined.wgsl' },
+				{ startIndex: 48, type: 'white.wgsl' },
+				{ startIndex: 49, type: 'variable.predefined.wgsl' },
+				{ startIndex: 66, type: 'white.wgsl' },
+				{ startIndex: 67, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 43, type: 'white.wgsl' },
+				{ startIndex: 44, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'white.wgsl' },
+				{ startIndex: 63, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 23, type: 'white.wgsl' },
+				{ startIndex: 24, type: 'variable.predefined.wgsl' },
+				{ startIndex: 35, type: 'white.wgsl' },
+				{ startIndex: 36, type: 'variable.predefined.wgsl' },
+				{ startIndex: 45, type: 'white.wgsl' },
+				{ startIndex: 46, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'white.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 65, type: 'white.wgsl' },
+				{ startIndex: 66, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'variable.predefined.wgsl' },
+				{ startIndex: 18, type: 'white.wgsl' },
+				{ startIndex: 19, type: 'variable.predefined.wgsl' },
+				{ startIndex: 28, type: 'white.wgsl' },
+				{ startIndex: 29, type: 'variable.predefined.wgsl' },
+				{ startIndex: 43, type: 'white.wgsl' },
+				{ startIndex: 44, type: 'variable.predefined.wgsl' },
+				{ startIndex: 69, type: 'white.wgsl' },
+				{ startIndex: 70, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 12, type: 'white.wgsl' },
+				{ startIndex: 13, type: 'variable.predefined.wgsl' },
+				{ startIndex: 26, type: 'white.wgsl' },
+				{ startIndex: 27, type: 'variable.predefined.wgsl' },
+				{ startIndex: 40, type: 'white.wgsl' },
+				{ startIndex: 41, type: 'variable.predefined.wgsl' },
+				{ startIndex: 54, type: 'white.wgsl' },
+				{ startIndex: 55, type: 'variable.predefined.wgsl' },
+				{ startIndex: 69, type: 'white.wgsl' },
+				{ startIndex: 70, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier',
+			tokens: [
+				{ startIndex: 0, type: 'variable.predefined.wgsl' },
+				{ startIndex: 15, type: 'white.wgsl' },
+				{ startIndex: 16, type: 'variable.predefined.wgsl' },
+				{ startIndex: 31, type: 'white.wgsl' },
+				{ startIndex: 32, type: 'variable.predefined.wgsl' },
+				{ startIndex: 47, type: 'white.wgsl' },
+				{ startIndex: 48, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'white.wgsl' },
+				{ startIndex: 63, type: 'variable.predefined.wgsl' }
+			]
+		},
+		{
+			line: 'workgroupUniformLoad',
+			tokens: [{ startIndex: 0, type: 'variable.predefined.wgsl' }]
+		}
+	],
+	// reserved
+	[
+		{ line: 'NULL', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'Self', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'abstract', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'active', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'alignas', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'alignof', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'as', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'asm', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'asm_fragment', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'async', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'attribute', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'auto', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'await', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'become', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'binding_array', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'cast', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'catch', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'class', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'co_await', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'co_return', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'co_yield', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'coherent', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'column_major', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'common', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'compile', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'compile_fragment', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'concept', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'const_cast', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'consteval', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'constexpr', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'constinit', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'crate', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'debugger', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'decltype', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'delete', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'demote', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'demote_to_helper', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'do', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'dynamic_cast', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'enum', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'explicit', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'export', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'extends', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'extern', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'external', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'fallthrough', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'filter', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'final', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'finally', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'friend', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'from', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'fxgroup', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'get', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'goto', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'groupshared', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'highp', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'impl', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'implements', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'import', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'inline', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'instanceof', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'interface', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'layout', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'lowp', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'macro', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'macro_rules', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'match', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'mediump', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'meta', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'mod', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'module', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'move', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'mut', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'mutable', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'namespace', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'new', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'nil', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'noexcept', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'noinline', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'nointerpolation', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'noperspective', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'null', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'nullptr', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'of', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'operator', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'package', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'packoffset', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'partition', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'pass', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'patch', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'pixelfragment', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'precise', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'precision', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'premerge', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'priv', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'protected', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'pub', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'public', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'readonly', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'ref', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'regardless', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'register', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'reinterpret_cast', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'require', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'resource', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'restrict', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'self', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'set', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'shared', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'sizeof', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'smooth', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'snorm', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'static', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'static_assert', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'static_cast', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'std', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'subroutine', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'super', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'target', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'template', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'this', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'thread_local', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'throw', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'trait', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'try', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'type', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'typedef', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'typeid', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'typename', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'typeof', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'union', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'unless', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'unorm', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'unsafe', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'unsized', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'use', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'using', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'varying', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'virtual', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'volatile', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'wgsl', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'where', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'with', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'writeonly', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] },
+		{ line: 'yield', tokens: [{ startIndex: 0, type: 'invalid.wgsl' }] }
+	],
+	// sampled texture
+	[
+		{
+			line: '@group(0) @binding(0) var texture_1d<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 36, type: 'operator.wgsl' },
+				{ startIndex: 37, type: 'variable.predefined.wgsl' },
+				{ startIndex: 40, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(1) var texture_2d<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 36, type: 'operator.wgsl' },
+				{ startIndex: 37, type: 'variable.predefined.wgsl' },
+				{ startIndex: 40, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(2) var texture_2d_array<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 42, type: 'operator.wgsl' },
+				{ startIndex: 43, type: 'variable.predefined.wgsl' },
+				{ startIndex: 46, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(3) var texture_3d<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 36, type: 'operator.wgsl' },
+				{ startIndex: 37, type: 'variable.predefined.wgsl' },
+				{ startIndex: 40, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(4) var texture_cube<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 38, type: 'operator.wgsl' },
+				{ startIndex: 39, type: 'variable.predefined.wgsl' },
+				{ startIndex: 42, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(5) var texture_cube_array<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 48, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// storage texture
+	[
+		{
+			line: '@group(0) @binding(0) var texture_storage_1d<rgba8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(1) var texture_storage_2d<rgba8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(2) var texture_storage_2d_array<rgba8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 50, type: 'operator.wgsl' },
+				{ startIndex: 51, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' },
+				{ startIndex: 62, type: 'variable.predefined.wgsl' },
+				{ startIndex: 67, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(3) var texture_storage_3d<rgba8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// texel formats
+	[
+		{
+			line: '@group(0) @binding(0) var texture_storage_2d<rgba8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(1) var texture_storage_2d<rgba8snorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(2) var texture_storage_2d<rgba8uint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 54, type: 'delimiter.wgsl' },
+				{ startIndex: 55, type: 'variable.predefined.wgsl' },
+				{ startIndex: 60, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(3) var texture_storage_2d<rgba8sint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 54, type: 'delimiter.wgsl' },
+				{ startIndex: 55, type: 'variable.predefined.wgsl' },
+				{ startIndex: 60, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(4) var texture_storage_2d<rgba16uint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(5) var texture_storage_2d<rgba16sint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(6) var texture_storage_2d<rgba16float,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 56, type: 'delimiter.wgsl' },
+				{ startIndex: 57, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(7) var texture_storage_2d<r32uint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 52, type: 'delimiter.wgsl' },
+				{ startIndex: 53, type: 'variable.predefined.wgsl' },
+				{ startIndex: 58, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(8) var texture_storage_2d<r32sint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 52, type: 'delimiter.wgsl' },
+				{ startIndex: 53, type: 'variable.predefined.wgsl' },
+				{ startIndex: 58, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(0) @binding(9) var texture_storage_2d<r32float,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'delimiter.wgsl' },
+				{ startIndex: 54, type: 'variable.predefined.wgsl' },
+				{ startIndex: 59, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(0) var texture_storage_2d<rg32uint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'delimiter.wgsl' },
+				{ startIndex: 54, type: 'variable.predefined.wgsl' },
+				{ startIndex: 59, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(1) var texture_storage_2d<rg32sint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 53, type: 'delimiter.wgsl' },
+				{ startIndex: 54, type: 'variable.predefined.wgsl' },
+				{ startIndex: 59, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(2) var texture_storage_2d<rg32float,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 54, type: 'delimiter.wgsl' },
+				{ startIndex: 55, type: 'variable.predefined.wgsl' },
+				{ startIndex: 60, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(3) var texture_storage_2d<rgba32uint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(4) var texture_storage_2d<rgba32sint,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(5) var texture_storage_2d<rgba32float,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 56, type: 'delimiter.wgsl' },
+				{ startIndex: 57, type: 'variable.predefined.wgsl' },
+				{ startIndex: 62, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: '@group(1) @binding(6) var texture_storage_2d<bgra8unorm,write>;',
+			tokens: [
+				{ startIndex: 0, type: 'annotation.wgsl' },
+				{ startIndex: 6, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 7, type: 'number.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'white.wgsl' },
+				{ startIndex: 10, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'keyword.wgsl' },
+				{ startIndex: 25, type: 'white.wgsl' },
+				{ startIndex: 26, type: 'variable.predefined.wgsl' },
+				{ startIndex: 44, type: 'operator.wgsl' },
+				{ startIndex: 45, type: 'variable.predefined.wgsl' },
+				{ startIndex: 55, type: 'delimiter.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'delimiter.wgsl' }
+			]
+		}
+	],
+	// tiny render
+	[
+		{ line: '@vertex', tokens: [{ startIndex: 0, type: 'annotation.wgsl' }] },
+		{
+			line: 'fn vmain(@location(0) v: vec4<f32>) -> @builtin(position) vec4f {',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 2, type: 'white.wgsl' },
+				{ startIndex: 3, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'annotation.wgsl' },
+				{ startIndex: 18, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 19, type: 'number.wgsl' },
+				{ startIndex: 20, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 21, type: 'white.wgsl' },
+				{ startIndex: 22, type: 'identifier.wgsl' },
+				{ startIndex: 23, type: 'delimiter.wgsl' },
+				{ startIndex: 24, type: 'white.wgsl' },
+				{ startIndex: 25, type: 'variable.predefined.wgsl' },
+				{ startIndex: 29, type: 'operator.wgsl' },
+				{ startIndex: 30, type: 'variable.predefined.wgsl' },
+				{ startIndex: 33, type: 'operator.wgsl' },
+				{ startIndex: 34, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 35, type: 'white.wgsl' },
+				{ startIndex: 36, type: 'operator.wgsl' },
+				{ startIndex: 38, type: 'white.wgsl' },
+				{ startIndex: 39, type: 'annotation.wgsl' },
+				{ startIndex: 47, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 48, type: 'variable.predefined.wgsl' },
+				{ startIndex: 56, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 57, type: 'white.wgsl' },
+				{ startIndex: 58, type: 'variable.predefined.wgsl' },
+				{ startIndex: 63, type: 'white.wgsl' },
+				{ startIndex: 64, type: 'delimiter.curly.wgsl' }
+			]
+		},
+		{
+			line: '  return v;',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'keyword.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'identifier.wgsl' },
+				{ startIndex: 10, type: 'delimiter.wgsl' }
+			]
+		},
+		{ line: '}', tokens: [{ startIndex: 0, type: 'delimiter.curly.wgsl' }] },
+		{ line: '', tokens: [] },
+		{ line: '@fragment', tokens: [{ startIndex: 0, type: 'annotation.wgsl' }] },
+		{
+			line: 'fn fmain(@builtin(position) pos: vec4f) -> @location(0) vec4f {',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 2, type: 'white.wgsl' },
+				{ startIndex: 3, type: 'identifier.wgsl' },
+				{ startIndex: 8, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 9, type: 'annotation.wgsl' },
+				{ startIndex: 17, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 18, type: 'variable.predefined.wgsl' },
+				{ startIndex: 26, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 27, type: 'white.wgsl' },
+				{ startIndex: 28, type: 'identifier.wgsl' },
+				{ startIndex: 31, type: 'delimiter.wgsl' },
+				{ startIndex: 32, type: 'white.wgsl' },
+				{ startIndex: 33, type: 'variable.predefined.wgsl' },
+				{ startIndex: 38, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 39, type: 'white.wgsl' },
+				{ startIndex: 40, type: 'operator.wgsl' },
+				{ startIndex: 42, type: 'white.wgsl' },
+				{ startIndex: 43, type: 'annotation.wgsl' },
+				{ startIndex: 52, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 53, type: 'number.wgsl' },
+				{ startIndex: 54, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 55, type: 'white.wgsl' },
+				{ startIndex: 56, type: 'variable.predefined.wgsl' },
+				{ startIndex: 61, type: 'white.wgsl' },
+				{ startIndex: 62, type: 'delimiter.curly.wgsl' }
+			]
+		},
+		{
+			line: '  return vec4f(0.25,0.25,1.0,1.0);',
+			tokens: [
+				{ startIndex: 0, type: 'white.wgsl' },
+				{ startIndex: 2, type: 'keyword.wgsl' },
+				{ startIndex: 8, type: 'white.wgsl' },
+				{ startIndex: 9, type: 'variable.predefined.wgsl' },
+				{ startIndex: 14, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 15, type: 'number.float.wgsl' },
+				{ startIndex: 19, type: 'delimiter.wgsl' },
+				{ startIndex: 20, type: 'number.float.wgsl' },
+				{ startIndex: 24, type: 'delimiter.wgsl' },
+				{ startIndex: 25, type: 'number.float.wgsl' },
+				{ startIndex: 28, type: 'delimiter.wgsl' },
+				{ startIndex: 29, type: 'number.float.wgsl' },
+				{ startIndex: 32, type: 'delimiter.parenthesis.wgsl' },
+				{ startIndex: 33, type: 'delimiter.wgsl' }
+			]
+		},
+		{ line: '}', tokens: [{ startIndex: 0, type: 'delimiter.curly.wgsl' }] }
+	],
+	// type generators
+	[
+		{
+			line: '// Test predeclared type generators, other than vector, matrix, and texture.',
+			tokens: [{ startIndex: 0, type: 'comment.wgsl' }]
+		},
+		{
+			line: 'alias a=array<f32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 13, type: 'operator.wgsl' },
+				{ startIndex: 14, type: 'variable.predefined.wgsl' },
+				{ startIndex: 17, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias b=atomic<i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 14, type: 'operator.wgsl' },
+				{ startIndex: 15, type: 'variable.predefined.wgsl' },
+				{ startIndex: 18, type: 'delimiter.wgsl' }
+			]
+		},
+		{
+			line: 'alias c=ptr<function,i32>;',
+			tokens: [
+				{ startIndex: 0, type: 'keyword.wgsl' },
+				{ startIndex: 5, type: 'white.wgsl' },
+				{ startIndex: 6, type: 'identifier.wgsl' },
+				{ startIndex: 7, type: 'operator.wgsl' },
+				{ startIndex: 8, type: 'variable.predefined.wgsl' },
+				{ startIndex: 11, type: 'operator.wgsl' },
+				{ startIndex: 12, type: 'variable.predefined.wgsl' },
+				{ startIndex: 20, type: 'delimiter.wgsl' },
+				{ startIndex: 21, type: 'variable.predefined.wgsl' },
+				{ startIndex: 24, type: 'delimiter.wgsl' }
+			]
+		}
+	]
+];
+testTokenization('wgsl', cases);

+ 485 - 0
src/basic-languages/wgsl/wgsl.ts

@@ -0,0 +1,485 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation, Google LLC. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import type { languages } from '../../fillers/monaco-editor-core';
+
+export const conf: languages.LanguageConfiguration = {
+	comments: {
+		lineComment: '//',
+		blockComment: ['/*', '*/']
+	},
+	brackets: [
+		['{', '}'],
+		['[', ']'],
+		['(', ')']
+	],
+	autoClosingPairs: [
+		{ open: '[', close: ']' },
+		{ open: '{', close: '}' },
+		{ open: '(', close: ')' }
+	],
+	surroundingPairs: [
+		{ open: '{', close: '}' },
+		{ open: '[', close: ']' },
+		{ open: '(', close: ')' }
+	]
+};
+
+// Returns a list of empty strings, from a possibly multi-line string,
+// stripping blanks and line endings. Emulates Perls 'qw' function.
+function qw(str: string): string[] {
+	let result: string[] = [];
+	const words = str.split(/\t+|\r+|\n+| +/);
+	for (let i = 0; i < words.length; ++i) {
+		if (words[i].length > 0) {
+			result.push(words[i]);
+		}
+	}
+	return result;
+}
+const atoms = qw('true false');
+
+const keywords = qw(`
+			  alias
+			  break
+			  case
+			  const
+			  const_assert
+			  continue
+			  continuing
+			  default
+			  diagnostic
+			  discard
+			  else
+			  enable
+			  fn
+			  for
+			  if
+			  let
+			  loop
+			  override
+			  requires
+			  return
+			  struct
+			  switch
+			  var
+			  while
+			  `);
+
+const reserved = qw(`
+			  NULL
+			  Self
+			  abstract
+			  active
+			  alignas
+			  alignof
+			  as
+			  asm
+			  asm_fragment
+			  async
+			  attribute
+			  auto
+			  await
+			  become
+			  binding_array
+			  cast
+			  catch
+			  class
+			  co_await
+			  co_return
+			  co_yield
+			  coherent
+			  column_major
+			  common
+			  compile
+			  compile_fragment
+			  concept
+			  const_cast
+			  consteval
+			  constexpr
+			  constinit
+			  crate
+			  debugger
+			  decltype
+			  delete
+			  demote
+			  demote_to_helper
+			  do
+			  dynamic_cast
+			  enum
+			  explicit
+			  export
+			  extends
+			  extern
+			  external
+			  fallthrough
+			  filter
+			  final
+			  finally
+			  friend
+			  from
+			  fxgroup
+			  get
+			  goto
+			  groupshared
+			  highp
+			  impl
+			  implements
+			  import
+			  inline
+			  instanceof
+			  interface
+			  layout
+			  lowp
+			  macro
+			  macro_rules
+			  match
+			  mediump
+			  meta
+			  mod
+			  module
+			  move
+			  mut
+			  mutable
+			  namespace
+			  new
+			  nil
+			  noexcept
+			  noinline
+			  nointerpolation
+			  noperspective
+			  null
+			  nullptr
+			  of
+			  operator
+			  package
+			  packoffset
+			  partition
+			  pass
+			  patch
+			  pixelfragment
+			  precise
+			  precision
+			  premerge
+			  priv
+			  protected
+			  pub
+			  public
+			  readonly
+			  ref
+			  regardless
+			  register
+			  reinterpret_cast
+			  require
+			  resource
+			  restrict
+			  self
+			  set
+			  shared
+			  sizeof
+			  smooth
+			  snorm
+			  static
+			  static_assert
+			  static_cast
+			  std
+			  subroutine
+			  super
+			  target
+			  template
+			  this
+			  thread_local
+			  throw
+			  trait
+			  try
+			  type
+			  typedef
+			  typeid
+			  typename
+			  typeof
+			  union
+			  unless
+			  unorm
+			  unsafe
+			  unsized
+			  use
+			  using
+			  varying
+			  virtual
+			  volatile
+			  wgsl
+			  where
+			  with
+			  writeonly
+			  yield
+			  `);
+
+const predeclared_enums = qw(`
+		read write read_write
+		function private workgroup uniform storage
+		perspective linear flat
+		center centroid sample
+		vertex_index instance_index position front_facing frag_depth
+			local_invocation_id local_invocation_index
+			global_invocation_id workgroup_id num_workgroups
+			sample_index sample_mask
+		rgba8unorm
+		rgba8snorm
+		rgba8uint
+		rgba8sint
+		rgba16uint
+		rgba16sint
+		rgba16float
+		r32uint
+		r32sint
+		r32float
+		rg32uint
+		rg32sint
+		rg32float
+		rgba32uint
+		rgba32sint
+		rgba32float
+		bgra8unorm
+`);
+
+const predeclared_types = qw(`
+		bool
+		f16
+		f32
+		i32
+		sampler sampler_comparison
+		texture_depth_2d
+		texture_depth_2d_array
+		texture_depth_cube
+		texture_depth_cube_array
+		texture_depth_multisampled_2d
+		texture_external
+		texture_external
+		u32
+		`);
+
+const predeclared_type_generators = qw(`
+		array
+		atomic
+		mat2x2
+		mat2x3
+		mat2x4
+		mat3x2
+		mat3x3
+		mat3x4
+		mat4x2
+		mat4x3
+		mat4x4
+		ptr
+		texture_1d
+		texture_2d
+		texture_2d_array
+		texture_3d
+		texture_cube
+		texture_cube_array
+		texture_multisampled_2d
+		texture_storage_1d
+		texture_storage_2d
+		texture_storage_2d_array
+		texture_storage_3d
+		vec2
+		vec3
+		vec4
+		`);
+
+const predeclared_type_aliases = qw(`
+		vec2i vec3i vec4i
+		vec2u vec3u vec4u
+		vec2f vec3f vec4f
+		vec2h vec3h vec4h
+		mat2x2f mat2x3f mat2x4f
+		mat3x2f mat3x3f mat3x4f
+		mat4x2f mat4x3f mat4x4f
+		mat2x2h mat2x3h mat2x4h
+		mat3x2h mat3x3h mat3x4h
+		mat4x2h mat4x3h mat4x4h
+		`);
+
+const predeclared_intrinsics = qw(`
+  bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2
+  ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross
+  degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit
+  firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length
+  log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract
+  reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose
+  trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine
+  textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers
+  textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare
+  textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge
+  textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin
+  atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm
+  pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm
+  unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier
+  workgroupUniformLoad
+`);
+
+// https://gpuweb.github.io/gpuweb/wgsl/#syntactic-token
+// But skip bracket-like things, comma, colon, semicolon, underscore, at.
+const operators = qw(`
+					 &
+					 &&
+					 ->
+					 /
+					 =
+					 ==
+					 !=
+					 >
+					 >=
+					 <
+					 <=
+					 %
+					 -
+					 --
+					 +
+					 ++
+					 |
+					 ||
+					 *
+					 <<
+					 >>
+					 +=
+					 -=
+					 *=
+					 /=
+					 %=
+					 &=
+					 |=
+					 ^=
+					 >>=
+					 <<=
+					 `);
+
+const directive_re = /enable|requires|diagnostic/;
+
+const ident_re = /[_\p{XID_Start}]\p{XID_Continue}*/u;
+
+const predefined_token = 'variable.predefined';
+
+export const language = <languages.IMonarchLanguage>{
+	tokenPostfix: '.wgsl',
+	defaultToken: 'invalid',
+	unicode: true,
+
+	atoms,
+	keywords,
+	reserved,
+	predeclared_enums,
+	predeclared_types,
+	predeclared_type_generators,
+	predeclared_type_aliases,
+	predeclared_intrinsics,
+	operators,
+
+	symbols: /[!%&*+\-\.\/:;<=>^|_~,]+/,
+
+	tokenizer: {
+		root: [
+			[directive_re, 'keyword', '@directive'],
+			[
+				// Identifier-like things, but also include '_'
+				ident_re,
+				{
+					cases: {
+						'@atoms': predefined_token,
+						'@keywords': 'keyword',
+						'@reserved': 'invalid',
+						'@predeclared_enums': predefined_token,
+						'@predeclared_types': predefined_token,
+						'@predeclared_type_generators': predefined_token,
+						'@predeclared_type_aliases': predefined_token,
+						'@predeclared_intrinsics': predefined_token,
+						'@default': 'identifier'
+					}
+				}
+			],
+			{ include: '@commentOrSpace' },
+			{ include: '@numbers' },
+
+			[/[{}()\[\]]/, '@brackets'],
+			['@', 'annotation', '@attribute'],
+			[
+				/@symbols/,
+				{
+					cases: {
+						'@operators': 'operator',
+						'@default': 'delimiter'
+					}
+				}
+			],
+			[/./, 'invalid']
+		],
+
+		commentOrSpace: [
+			[/\s+/, 'white'],
+			[/\/\*/, 'comment', '@blockComment'],
+			[/\/\/.*$/, 'comment']
+		],
+
+		blockComment: [
+			// Soak up uninteresting text: anything except * or /
+			[/[^\/*]+/, 'comment'],
+			// Recognize the start of a nested block comment.
+			[/\/\*/, 'comment', '@push'],
+			// Recognize the end of a nested block comment.
+			[/\*\//, 'comment', '@pop'],
+			// Recognize insignificant * and /
+			[/[\/*]/, 'comment']
+		],
+
+		attribute: [
+			// For things like '@fragment' both '@' and 'fragment'
+			// are marked as annotations.  This should work even if
+			// there are spaces or comments between the two tokens.
+			{ include: '@commentOrSpace' },
+			[/\w+/, 'annotation', '@pop']
+		],
+
+		directive: [
+			// For things like 'enable f16;', 'enable' maps to 'meta'
+			// and 'f16' maps to 'meta.tag'.
+			{ include: '@commentOrSpace' },
+			[/[()]/, '@brackets'],
+			[/,/, 'delimiter'],
+			[ident_re, 'meta.content'],
+			[/;/, 'delimiter', '@pop']
+		],
+
+		numbers: [
+			// Decimal float literals
+			// https://www.w3.org/TR/WGSL/#syntax-decimal_float_literal
+			// 0, with type-specifying suffix.
+			[/0[fh]/, 'number.float'],
+			// Other decimal integer, with type-specifying suffix.
+			[/[1-9][0-9]*[fh]/, 'number.float'],
+			// Has decimal point, at least one digit after decimal.
+			[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/, 'number.float'],
+			// Has decimal point, at least one digit before decimal.
+			[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/, 'number.float'],
+			// Has at least one digit, and has an exponent.
+			[/[0-9]+[eE][+-]?[0-9]+[fh]?/, 'number.float'],
+
+			// Hex float literals
+			// https://www.w3.org/TR/WGSL/#syntax-hex_float_literal
+			[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/, 'number.hex'],
+			[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/, 'number.hex'],
+			[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/, 'number.hex'],
+
+			// Hexadecimal integer literals
+			// https://www.w3.org/TR/WGSL/#syntax-hex_int_literal
+			[/0[xX][0-9a-fA-F]+[iu]?/, 'number.hex'],
+
+			// Decimal integer literals
+			// https://www.w3.org/TR/WGSL/#syntax-decimal_int_literal
+			// We need two rules here because 01 is not valid.
+			[/[1-9][0-9]*[iu]?/, 'number'],
+			[/0[iu]?/, 'number'] // Must match last
+		]
+	}
+};

+ 4 - 0
src/basic-languages/xml/xml.contribution.ts

@@ -12,10 +12,13 @@ registerLanguage({
 	id: 'xml',
 	extensions: [
 		'.xml',
+		'.xsd',
 		'.dtd',
 		'.ascx',
 		'.csproj',
 		'.config',
+		'.props',
+		'.targets',
 		'.wxi',
 		'.wxl',
 		'.wxs',
@@ -23,6 +26,7 @@ registerLanguage({
 		'.svg',
 		'.svgz',
 		'.opf',
+		'.xslt',
 		'.xsl'
 	],
 	firstLine: '(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)',

+ 193 - 0
src/basic-languages/yaml/yaml.test.ts

@@ -458,6 +458,7 @@ testTokenization('yaml', [
 				{ startIndex: 4, type: 'operators.yaml' },
 				{ startIndex: 5, type: 'white.yaml' },
 				{ startIndex: 6, type: 'string.yaml' },
+				{ startIndex: 28, type: 'white.yaml' },
 				{ startIndex: 29, type: 'comment.yaml' }
 			]
 		}
@@ -470,8 +471,200 @@ testTokenization('yaml', [
 				{ startIndex: 6, type: 'operators.yaml' },
 				{ startIndex: 7, type: 'white.yaml' },
 				{ startIndex: 8, type: 'string.yaml' },
+				{ startIndex: 9, type: 'white.yaml' },
 				{ startIndex: 10, type: 'comment.yaml' }
 			]
 		}
+	],
+
+	// ': ' in double-quoted Value
+	[
+		{
+			line: 'key: "va: lue"',
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				}
+			]
+		}
+	],
+
+	// ': ' in single-quoted Value
+	[
+		{
+			line: "key: 'va: lue'",
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				}
+			]
+		}
+	],
+
+	// '#' in single-quoted Value
+	[
+		{
+			line: "key: 'va#lue'",
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				}
+			]
+		}
+	],
+
+	// '#' in double-quoted Value
+	[
+		{
+			line: 'key: "va#lue"',
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				}
+			]
+		}
+	],
+
+	// '#' in  Value
+	[
+		{
+			line: 'key: va#lue',
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				}
+			]
+		}
+	],
+
+	// Comment following Value
+	[
+		{
+			line: 'key: value #comment',
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				},
+				{
+					startIndex: 10,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 11,
+					type: 'comment.yaml'
+				}
+			]
+		}
+	],
+
+	// ': ' in Comment following Value
+	[
+		{
+			line: 'key: value #comment: also comment',
+			tokens: [
+				{
+					startIndex: 0,
+					type: 'type.yaml'
+				},
+				{
+					startIndex: 3,
+					type: 'operators.yaml'
+				},
+				{
+					startIndex: 4,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 5,
+					type: 'string.yaml'
+				},
+				{
+					startIndex: 10,
+					type: 'white.yaml'
+				},
+				{
+					startIndex: 11,
+					type: 'comment.yaml'
+				}
+			]
+		}
 	]
 ]);

+ 2 - 2
src/basic-languages/yaml/yaml.ts

@@ -86,13 +86,13 @@ export const language = <languages.IMonarchLanguage>{
 			[/@numberDate(?![ \t]*\S+)/, 'number.date'],
 
 			// Key:Value pair
-			[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
+			[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
 
 			{ include: '@flowScalars' },
 
 			// String nodes
 			[
-				/[^#]+/,
+				/.+?(?=(\s+#|$))/,
 				{
 					cases: {
 						'@keywords': 'keyword',

+ 2 - 0
src/language/common/lspLanguageFeatures.ts

@@ -803,6 +803,8 @@ export class DocumentFormattingEditProvider<T extends ILanguageWorkerWithFormat>
 export class DocumentRangeFormattingEditProvider<T extends ILanguageWorkerWithFormat>
 	implements languages.DocumentRangeFormattingEditProvider
 {
+	readonly canFormatMultipleRanges = false;
+
 	constructor(private _worker: WorkerAccessor<T>) {}
 
 	public provideDocumentRangeFormattingEdits(

+ 31 - 29
src/language/typescript/languageFeatures.ts

@@ -474,7 +474,7 @@ export class SuggestAdapter extends Adapter implements languages.CompletionItemP
 			}
 
 			const tags: languages.CompletionItemTag[] = [];
-			if (entry.kindModifiers?.indexOf('deprecated') !== -1) {
+			if (entry.kindModifiers !== undefined && entry.kindModifiers.indexOf('deprecated') !== -1) {
 				tags.push(languages.CompletionItemTag.Deprecated);
 			}
 
@@ -715,7 +715,10 @@ export class QuickInfoAdapter extends Adapter implements languages.HoverProvider
 
 // --- occurrences ------
 
-export class OccurrencesAdapter extends Adapter implements languages.DocumentHighlightProvider {
+export class DocumentHighlightAdapter
+	extends Adapter
+	implements languages.DocumentHighlightProvider
+{
 	public async provideDocumentHighlights(
 		model: editor.ITextModel,
 		position: Position,
@@ -729,19 +732,24 @@ export class OccurrencesAdapter extends Adapter implements languages.DocumentHig
 			return;
 		}
 
-		const entries = await worker.getOccurrencesAtPosition(resource.toString(), offset);
+		const entries = await worker.getDocumentHighlights(resource.toString(), offset, [
+			resource.toString()
+		]);
 
 		if (!entries || model.isDisposed()) {
 			return;
 		}
 
-		return entries.map((entry) => {
-			return <languages.DocumentHighlight>{
-				range: this._textSpanToRange(model, entry.textSpan),
-				kind: entry.isWriteAccess
-					? languages.DocumentHighlightKind.Write
-					: languages.DocumentHighlightKind.Text
-			};
+		return entries.flatMap((entry) => {
+			return entry.highlightSpans.map((highlightSpans) => {
+				return <languages.DocumentHighlight>{
+					range: this._textSpanToRange(model, highlightSpans.textSpan),
+					kind:
+						highlightSpans.kind === 'writtenReference'
+							? languages.DocumentHighlightKind.Write
+							: languages.DocumentHighlightKind.Text
+				};
+			});
 		});
 	}
 }
@@ -865,39 +873,31 @@ export class OutlineAdapter extends Adapter implements languages.DocumentSymbolP
 			return;
 		}
 
-		const items = await worker.getNavigationBarItems(resource.toString());
+		const root = await worker.getNavigationTree(resource.toString());
 
-		if (!items || model.isDisposed()) {
+		if (!root || model.isDisposed()) {
 			return;
 		}
 
 		const convert = (
-			bucket: languages.DocumentSymbol[],
-			item: ts.NavigationBarItem,
+			item: ts.NavigationTree,
 			containerLabel?: string
-		): void => {
-			let result: languages.DocumentSymbol = {
+		): languages.DocumentSymbol => {
+			const result: languages.DocumentSymbol = {
 				name: item.text,
 				detail: '',
 				kind: <languages.SymbolKind>(outlineTypeTable[item.kind] || languages.SymbolKind.Variable),
 				range: this._textSpanToRange(model, item.spans[0]),
 				selectionRange: this._textSpanToRange(model, item.spans[0]),
-				tags: []
+				tags: [],
+				children: item.childItems?.map((child) => convert(child, item.text)),
+				containerName: containerLabel
 			};
-
-			if (containerLabel) result.containerName = containerLabel;
-
-			if (item.childItems && item.childItems.length > 0) {
-				for (let child of item.childItems) {
-					convert(bucket, child, result.name);
-				}
-			}
-
-			bucket.push(result);
+			return result;
 		};
 
-		let result: languages.DocumentSymbol[] = [];
-		items.forEach((item) => convert(result, item));
+		// Exclude the root node, as it alwas spans the entire document.
+		const result = root.childItems ? root.childItems.map((item) => convert(item)) : [];
 		return result;
 	}
 }
@@ -989,6 +989,8 @@ export class FormatAdapter
 	extends FormatHelper
 	implements languages.DocumentRangeFormattingEditProvider
 {
+	readonly canFormatMultipleRanges = false;
+
 	public async provideDocumentRangeFormattingEdits(
 		model: editor.ITextModel,
 		range: Range,

+ 17 - 3
src/language/typescript/lib/lib.index.ts

@@ -10,6 +10,8 @@
 /** Contains all the lib files */
 export const libFileSet: Record<string, boolean> = {}
 libFileSet['lib.d.ts'] = true;
+libFileSet['lib.decorators.d.ts'] = true;
+libFileSet['lib.decorators.legacy.d.ts'] = true;
 libFileSet['lib.dom.d.ts'] = true;
 libFileSet['lib.dom.iterable.d.ts'] = true;
 libFileSet['lib.es2015.collection.d.ts'] = true;
@@ -42,13 +44,16 @@ libFileSet['lib.es2018.regexp.d.ts'] = true;
 libFileSet['lib.es2019.array.d.ts'] = true;
 libFileSet['lib.es2019.d.ts'] = true;
 libFileSet['lib.es2019.full.d.ts'] = true;
+libFileSet['lib.es2019.intl.d.ts'] = true;
 libFileSet['lib.es2019.object.d.ts'] = true;
 libFileSet['lib.es2019.string.d.ts'] = true;
 libFileSet['lib.es2019.symbol.d.ts'] = true;
 libFileSet['lib.es2020.bigint.d.ts'] = true;
 libFileSet['lib.es2020.d.ts'] = true;
+libFileSet['lib.es2020.date.d.ts'] = true;
 libFileSet['lib.es2020.full.d.ts'] = true;
 libFileSet['lib.es2020.intl.d.ts'] = true;
+libFileSet['lib.es2020.number.d.ts'] = true;
 libFileSet['lib.es2020.promise.d.ts'] = true;
 libFileSet['lib.es2020.sharedmemory.d.ts'] = true;
 libFileSet['lib.es2020.string.d.ts'] = true;
@@ -59,14 +64,23 @@ libFileSet['lib.es2021.intl.d.ts'] = true;
 libFileSet['lib.es2021.promise.d.ts'] = true;
 libFileSet['lib.es2021.string.d.ts'] = true;
 libFileSet['lib.es2021.weakref.d.ts'] = true;
+libFileSet['lib.es2022.array.d.ts'] = true;
+libFileSet['lib.es2022.d.ts'] = true;
+libFileSet['lib.es2022.error.d.ts'] = true;
+libFileSet['lib.es2022.full.d.ts'] = true;
+libFileSet['lib.es2022.intl.d.ts'] = true;
+libFileSet['lib.es2022.object.d.ts'] = true;
+libFileSet['lib.es2022.regexp.d.ts'] = true;
+libFileSet['lib.es2022.sharedmemory.d.ts'] = true;
+libFileSet['lib.es2022.string.d.ts'] = true;
+libFileSet['lib.es2023.array.d.ts'] = true;
+libFileSet['lib.es2023.d.ts'] = true;
+libFileSet['lib.es2023.full.d.ts'] = true;
 libFileSet['lib.es5.d.ts'] = true;
 libFileSet['lib.es6.d.ts'] = true;
 libFileSet['lib.esnext.d.ts'] = true;
 libFileSet['lib.esnext.full.d.ts'] = true;
 libFileSet['lib.esnext.intl.d.ts'] = true;
-libFileSet['lib.esnext.promise.d.ts'] = true;
-libFileSet['lib.esnext.string.d.ts'] = true;
-libFileSet['lib.esnext.weakref.d.ts'] = true;
 libFileSet['lib.scripthost.d.ts'] = true;
 libFileSet['lib.webworker.d.ts'] = true;
 libFileSet['lib.webworker.importscripts.d.ts'] = true;

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 1
src/language/typescript/lib/lib.ts


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 9969
src/language/typescript/lib/typescriptServices-amd.js


Diff do ficheiro suprimidas por serem muito extensas
+ 246 - 308
src/language/typescript/lib/typescriptServices.d.ts


Diff do ficheiro suprimidas por serem muito extensas
+ 2235 - 555
src/language/typescript/lib/typescriptServices.js


+ 1 - 1
src/language/typescript/lib/typescriptServicesMetadata.ts

@@ -2,4 +2,4 @@
 // **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`
 //
 
-export const typescriptVersion = "4.5.5";
+export const typescriptVersion = "5.0.2";

+ 108 - 11
src/language/typescript/monaco.contribution.ts

@@ -226,6 +226,73 @@ interface OutputFile {
 	text: string;
 }
 
+export interface ModeConfiguration {
+	/**
+	 * Defines whether the built-in completionItemProvider is enabled.
+	 */
+	readonly completionItems?: boolean;
+
+	/**
+	 * Defines whether the built-in hoverProvider is enabled.
+	 */
+	readonly hovers?: boolean;
+
+	/**
+	 * Defines whether the built-in documentSymbolProvider is enabled.
+	 */
+	readonly documentSymbols?: boolean;
+
+	/**
+	 * Defines whether the built-in definitions provider is enabled.
+	 */
+	readonly definitions?: boolean;
+
+	/**
+	 * Defines whether the built-in references provider is enabled.
+	 */
+	readonly references?: boolean;
+
+	/**
+	 * Defines whether the built-in references provider is enabled.
+	 */
+	readonly documentHighlights?: boolean;
+
+	/**
+	 * Defines whether the built-in rename provider is enabled.
+	 */
+	readonly rename?: boolean;
+
+	/**
+	 * Defines whether the built-in diagnostic provider is enabled.
+	 */
+	readonly diagnostics?: boolean;
+
+	/**
+	 * Defines whether the built-in document formatting range edit provider is enabled.
+	 */
+	readonly documentRangeFormattingEdits?: boolean;
+
+	/**
+	 * Defines whether the built-in signature help provider is enabled.
+	 */
+	readonly signatureHelp?: boolean;
+
+	/**
+	 * Defines whether the built-in onType formatting edit provider is enabled.
+	 */
+	readonly onTypeFormattingEdits?: boolean;
+
+	/**
+	 * Defines whether the built-in code actions provider is enabled.
+	 */
+	readonly codeActions?: boolean;
+
+	/**
+	 * Defines whether the built-in inlay hints provider is enabled.
+	 */
+	readonly inlayHints?: boolean;
+}
+
 export interface LanguageServiceDefaults {
 	/**
 	 * Event fired when compiler options or diagnostics options are changed.
@@ -241,6 +308,9 @@ export interface LanguageServiceDefaults {
 
 	readonly inlayHintsOptions: InlayHintsOptions;
 
+	readonly modeConfiguration: ModeConfiguration;
+	setModeConfiguration(modeConfiguration: ModeConfiguration): void;
+
 	/**
 	 * Get the current extra libs registered with the language service.
 	 */
@@ -370,13 +440,10 @@ export interface TypeScriptWorker {
 	 */
 	getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
 
-	/**
-	 * Get other ranges which are related to the item at the given position in the file (often used for highlighting).
-	 * @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
-	 */
-	getOccurrencesAtPosition(
+	getDocumentHighlights(
 		fileName: string,
-		position: number
+		position: number,
+		filesToSearch: string[]
 	): Promise<ReadonlyArray<any> | undefined>;
 
 	/**
@@ -396,9 +463,9 @@ export interface TypeScriptWorker {
 
 	/**
 	 * Get outline entries for the item at the given position in the file.
-	 * @returns `Promise<typescript.NavigationBarItem[]>`
+	 * @returns `Promise<typescript.NavigationTree | undefined>`
 	 */
-	getNavigationBarItems(fileName: string): Promise<any[]>;
+	getNavigationTree(fileName: string): Promise<any | undefined>;
 
 	/**
 	 * Get changes which should be applied to format the given file.
@@ -491,12 +558,14 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
 	private _workerOptions!: WorkerOptions;
 	private _onDidExtraLibsChangeTimeout: number;
 	private _inlayHintsOptions!: InlayHintsOptions;
+	private _modeConfiguration!: ModeConfiguration;
 
 	constructor(
 		compilerOptions: CompilerOptions,
 		diagnosticsOptions: DiagnosticsOptions,
 		workerOptions: WorkerOptions,
-		inlayHintsOptions: InlayHintsOptions
+		inlayHintsOptions: InlayHintsOptions,
+		modeConfiguration: ModeConfiguration
 	) {
 		this._extraLibs = Object.create(null);
 		this._removedExtraLibs = Object.create(null);
@@ -505,6 +574,7 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
 		this.setDiagnosticsOptions(diagnosticsOptions);
 		this.setWorkerOptions(workerOptions);
 		this.setInlayHintsOptions(inlayHintsOptions);
+		this.setModeConfiguration(modeConfiguration);
 		this._onDidExtraLibsChangeTimeout = -1;
 	}
 
@@ -516,6 +586,10 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
 		return this._onDidExtraLibsChange.event;
 	}
 
+	get modeConfiguration(): ModeConfiguration {
+		return this._modeConfiguration;
+	}
+
 	get workerOptions(): WorkerOptions {
 		return this._workerOptions;
 	}
@@ -650,22 +724,45 @@ class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
 	getEagerModelSync() {
 		return this._eagerModelSync;
 	}
+
+	setModeConfiguration(modeConfiguration: ModeConfiguration): void {
+		this._modeConfiguration = modeConfiguration || Object.create(null);
+		this._onDidChange.fire(undefined);
+	}
 }
 
 export const typescriptVersion: string = tsversion;
 
+const modeConfigurationDefault: Required<ModeConfiguration> = {
+	completionItems: true,
+	hovers: true,
+	documentSymbols: true,
+	definitions: true,
+	references: true,
+	documentHighlights: true,
+	rename: true,
+	diagnostics: true,
+	documentRangeFormattingEdits: true,
+	signatureHelp: true,
+	onTypeFormattingEdits: true,
+	codeActions: true,
+	inlayHints: true
+};
+
 export const typescriptDefaults: LanguageServiceDefaults = new LanguageServiceDefaultsImpl(
 	{ allowNonTsExtensions: true, target: ScriptTarget.Latest },
 	{ noSemanticValidation: false, noSyntaxValidation: false, onlyVisible: false },
 	{},
-	{}
+	{},
+	modeConfigurationDefault
 );
 
 export const javascriptDefaults: LanguageServiceDefaults = new LanguageServiceDefaultsImpl(
 	{ allowNonTsExtensions: true, allowJs: true, target: ScriptTarget.Latest },
 	{ noSemanticValidation: true, noSyntaxValidation: false, onlyVisible: false },
 	{},
-	{}
+	{},
+	modeConfigurationDefault
 );
 
 export const getTypeScriptWorker = (): Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>> => {

+ 119 - 32
src/language/typescript/tsMode.ts

@@ -7,7 +7,7 @@ import { WorkerManager } from './workerManager';
 import type { TypeScriptWorker } from './tsWorker';
 import { LanguageServiceDefaults } from './monaco.contribution';
 import * as languageFeatures from './languageFeatures';
-import { languages, Uri } from '../../fillers/monaco-editor-core';
+import { languages, IDisposable, Uri } from '../../fillers/monaco-editor-core';
 
 let javaScriptWorker: (...uris: Uri[]) => Promise<TypeScriptWorker>;
 let typeScriptWorker: (...uris: Uri[]) => Promise<TypeScriptWorker>;
@@ -44,46 +44,133 @@ function setupMode(
 	defaults: LanguageServiceDefaults,
 	modeId: string
 ): (...uris: Uri[]) => Promise<TypeScriptWorker> {
+	const disposables: IDisposable[] = [];
+	const providers: IDisposable[] = [];
+
 	const client = new WorkerManager(modeId, defaults);
+	disposables.push(client);
+
 	const worker = (...uris: Uri[]): Promise<TypeScriptWorker> => {
 		return client.getLanguageServiceWorker(...uris);
 	};
 
 	const libFiles = new languageFeatures.LibFiles(worker);
 
-	languages.registerCompletionItemProvider(modeId, new languageFeatures.SuggestAdapter(worker));
-	languages.registerSignatureHelpProvider(
-		modeId,
-		new languageFeatures.SignatureHelpAdapter(worker)
-	);
-	languages.registerHoverProvider(modeId, new languageFeatures.QuickInfoAdapter(worker));
-	languages.registerDocumentHighlightProvider(
-		modeId,
-		new languageFeatures.OccurrencesAdapter(worker)
-	);
-	languages.registerDefinitionProvider(
-		modeId,
-		new languageFeatures.DefinitionAdapter(libFiles, worker)
-	);
-	languages.registerReferenceProvider(
-		modeId,
-		new languageFeatures.ReferenceAdapter(libFiles, worker)
-	);
-	languages.registerDocumentSymbolProvider(modeId, new languageFeatures.OutlineAdapter(worker));
-	languages.registerDocumentRangeFormattingEditProvider(
-		modeId,
-		new languageFeatures.FormatAdapter(worker)
-	);
-	languages.registerOnTypeFormattingEditProvider(
-		modeId,
-		new languageFeatures.FormatOnTypeAdapter(worker)
-	);
-	languages.registerCodeActionProvider(modeId, new languageFeatures.CodeActionAdaptor(worker));
-	languages.registerRenameProvider(modeId, new languageFeatures.RenameAdapter(libFiles, worker));
-	languages.registerInlayHintsProvider(modeId, new languageFeatures.InlayHintsAdapter(worker));
-	new languageFeatures.DiagnosticsAdapter(libFiles, defaults, modeId, worker);
+	function registerProviders(): void {
+		const { modeConfiguration } = defaults;
+
+		disposeAll(providers);
+
+		if (modeConfiguration.completionItems) {
+			providers.push(
+				languages.registerCompletionItemProvider(
+					modeId,
+					new languageFeatures.SuggestAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.signatureHelp) {
+			providers.push(
+				languages.registerSignatureHelpProvider(
+					modeId,
+					new languageFeatures.SignatureHelpAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.hovers) {
+			providers.push(
+				languages.registerHoverProvider(modeId, new languageFeatures.QuickInfoAdapter(worker))
+			);
+		}
+		if (modeConfiguration.documentHighlights) {
+			providers.push(
+				languages.registerDocumentHighlightProvider(
+					modeId,
+					new languageFeatures.DocumentHighlightAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.definitions) {
+			providers.push(
+				languages.registerDefinitionProvider(
+					modeId,
+					new languageFeatures.DefinitionAdapter(libFiles, worker)
+				)
+			);
+		}
+		if (modeConfiguration.references) {
+			providers.push(
+				languages.registerReferenceProvider(
+					modeId,
+					new languageFeatures.ReferenceAdapter(libFiles, worker)
+				)
+			);
+		}
+		if (modeConfiguration.documentSymbols) {
+			providers.push(
+				languages.registerDocumentSymbolProvider(
+					modeId,
+					new languageFeatures.OutlineAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.rename) {
+			providers.push(
+				languages.registerRenameProvider(
+					modeId,
+					new languageFeatures.RenameAdapter(libFiles, worker)
+				)
+			);
+		}
+		if (modeConfiguration.documentRangeFormattingEdits) {
+			providers.push(
+				languages.registerDocumentRangeFormattingEditProvider(
+					modeId,
+					new languageFeatures.FormatAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.onTypeFormattingEdits) {
+			providers.push(
+				languages.registerOnTypeFormattingEditProvider(
+					modeId,
+					new languageFeatures.FormatOnTypeAdapter(worker)
+				)
+			);
+		}
+		if (modeConfiguration.codeActions) {
+			providers.push(
+				languages.registerCodeActionProvider(modeId, new languageFeatures.CodeActionAdaptor(worker))
+			);
+		}
+		if (modeConfiguration.inlayHints) {
+			providers.push(
+				languages.registerInlayHintsProvider(modeId, new languageFeatures.InlayHintsAdapter(worker))
+			);
+		}
+		if (modeConfiguration.diagnostics) {
+			providers.push(new languageFeatures.DiagnosticsAdapter(libFiles, defaults, modeId, worker));
+		}
+	}
+
+	registerProviders();
+
+	disposables.push(asDisposable(providers));
+
+	//return asDisposable(disposables);
+
 	return worker;
 }
 
+function asDisposable(disposables: IDisposable[]): IDisposable {
+	return { dispose: () => disposeAll(disposables) };
+}
+
+function disposeAll(disposables: IDisposable[]) {
+	while (disposables.length) {
+		disposables.pop()!.dispose();
+	}
+}
+
 export { WorkerManager } from './workerManager';
 export * from './languageFeatures';

+ 12 - 11
src/language/typescript/tsWorker.ts

@@ -38,7 +38,7 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 	private _extraLibs: IExtraLibs = Object.create(null);
 	private _languageService = ts.createLanguageService(this);
 	private _compilerOptions: ts.CompilerOptions;
-	private _inlayHintsOptions?: ts.InlayHintsOptions;
+	private _inlayHintsOptions?: ts.UserPreferences;
 
 	constructor(ctx: worker.IWorkerContext, createData: ICreateData) {
 		this._ctx = ctx;
@@ -63,7 +63,7 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 
 	getScriptFileNames(): string[] {
 		const allModels = this._ctx.getMirrorModels().map((model) => model.uri);
-		const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString(true));
+		const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString());
 		return models.concat(Object.keys(this._extraLibs));
 	}
 
@@ -299,14 +299,15 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 		return this._languageService.getQuickInfoAtPosition(fileName, position);
 	}
 
-	async getOccurrencesAtPosition(
+	async getDocumentHighlights(
 		fileName: string,
-		position: number
-	): Promise<ReadonlyArray<ts.ReferenceEntry> | undefined> {
+		position: number,
+		filesToSearch: string[]
+	): Promise<ReadonlyArray<ts.DocumentHighlights> | undefined> {
 		if (fileNameIsLib(fileName)) {
 			return undefined;
 		}
-		return this._languageService.getOccurrencesAtPosition(fileName, position);
+		return this._languageService.getDocumentHighlights(fileName, position, filesToSearch);
 	}
 
 	async getDefinitionAtPosition(
@@ -329,11 +330,11 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 		return this._languageService.getReferencesAtPosition(fileName, position);
 	}
 
-	async getNavigationBarItems(fileName: string): Promise<ts.NavigationBarItem[]> {
+	async getNavigationTree(fileName: string): Promise<ts.NavigationTree | undefined> {
 		if (fileNameIsLib(fileName)) {
-			return [];
+			return undefined;
 		}
-		return this._languageService.getNavigationBarItems(fileName);
+		return this._languageService.getNavigationTree(fileName);
 	}
 
 	async getFormattingEditsForDocument(
@@ -444,7 +445,7 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
 		if (fileNameIsLib(fileName)) {
 			return [];
 		}
-		const preferences: ts.InlayHintsOptions = this._inlayHintsOptions ?? {};
+		const preferences: ts.UserPreferences = this._inlayHintsOptions ?? {};
 		const span: ts.TextSpan = {
 			start,
 			length: end - start
@@ -462,7 +463,7 @@ export interface ICreateData {
 	compilerOptions: ts.CompilerOptions;
 	extraLibs: IExtraLibs;
 	customWorkerPath?: string;
-	inlayHintsOptions?: ts.InlayHintsOptions;
+	inlayHintsOptions?: ts.UserPreferences;
 }
 
 /** The shape of the factory */

+ 5 - 2
src/tsconfig.json

@@ -4,8 +4,11 @@
 		"lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"],
 		"module": "amd",
 		"moduleResolution": "node",
-		"outDir": "../out/amd",
+		"outDir": "../out/languages/amd-tsc",
 		"strict": true,
-		"target": "es5"
+		"target": "es5",
+		"sourceMap": true,
+		"allowJs": true,
+		"checkJs": false
 	}
 }

+ 2 - 2
test/manual/dev-setup.js

@@ -39,7 +39,7 @@
 			'<ul><li>' +
 			renderLoadingOptions(true) +
 			(isRelease ? '' : `</li><li>${renderLoadingOptions(false)}`) +
-			'</li></ul>';
+			'</li></ul>'; // CodeQL [SM03712] This code is not deployed and serves as local test code. No risk of malicious input.
 
 		document.body.appendChild(div);
 
@@ -47,7 +47,7 @@
 		for (let i = 0; i < aElements.length; i++) {
 			let aElement = aElements[i];
 			if (aElement.className === 'loading-opts') {
-				aElement.href += window.location.search;
+				aElement.href += window.location.search; // CodeQL [SM01507] This code is not deployed and serves as local test code. No risk of malicious input.
 			}
 		}
 	})();

+ 2 - 2
test/smoke/amd/index.html

@@ -5,11 +5,11 @@
 	</head>
 	<body>
 		<div id="editor-container" style="position: absolute; width: 500px; height: 400px"></div>
-		<script src="../../../release/dev/vs/loader.js"></script>
+		<script src="../../../out/monaco-editor/dev/vs/loader.js"></script>
 		<script>
 			require.config({
 				paths: {
-					vs: '../../../release/dev/vs'
+					vs: '../../../out/monaco-editor/dev/vs'
 				}
 			});
 			require(['vs/editor/editor.main'], () => {

+ 1 - 1
test/smoke/esbuild/index.js

@@ -3,7 +3,7 @@
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 
-import * as monaco from '../../../release/esm/vs/editor/editor.main.js';
+import * as monaco from '../../../out/monaco-editor/esm/vs/editor/editor.main.js';
 
 self.MonacoEnvironment = {
 	getWorkerUrl: function (moduleId, label) {

+ 4 - 2
test/smoke/package-esbuild.ts

@@ -18,11 +18,13 @@ const workerEntryPoints = [
 ];
 
 build({
-	entryPoints: workerEntryPoints.map((entry) => path.join(__dirname, `../../release/esm/${entry}`)),
+	entryPoints: workerEntryPoints.map((entry) =>
+		path.join(__dirname, `../../out/monaco-editor/esm/${entry}`)
+	),
 	bundle: true,
 	format: 'iife',
 	logLevel: 'silent',
-	outbase: path.join(__dirname, '../../release/esm/'),
+	outbase: path.join(__dirname, '../../out/monaco-editor/esm/'),
 	outdir: path.join(__dirname, 'esbuild/out')
 });
 

+ 2 - 2
test/smoke/package-webpack.ts

@@ -24,7 +24,7 @@ webpack(
 		},
 		resolve: {
 			alias: {
-				'monaco-editor': path.resolve(REPO_ROOT, 'release')
+				'monaco-editor': path.resolve(REPO_ROOT, 'out/monaco-editor')
 			}
 		},
 		module: {
@@ -40,7 +40,7 @@ webpack(
 			]
 		},
 		plugins: [<any>new MonacoWebpackPlugin({
-				monacoEditorPath: path.resolve(REPO_ROOT, 'release')
+				monacoEditorPath: path.resolve(REPO_ROOT, 'out/monaco-editor')
 			})]
 	},
 	(err: Error | undefined, stats: webpack.Stats | undefined) => {

+ 14 - 8
test/smoke/parcel/index.js

@@ -1,34 +1,40 @@
-import * as monaco from '../../../release/esm/vs/editor/editor.main.js';
+import * as monaco from '../../../out/monaco-editor/esm/vs/editor/editor.main.js';
 
 self.MonacoEnvironment = {
 	getWorker: function (moduleId, label) {
 		if (label === 'json') {
 			return new Worker(
-				new URL('../../../release/esm/vs/language/json/json.worker.js', import.meta.url),
+				new URL('../../../out/monaco-editor/esm/vs/language/json/json.worker.js', import.meta.url),
 				{ type: 'module' }
 			);
 		}
 		if (label === 'css' || label === 'scss' || label === 'less') {
 			return new Worker(
-				new URL('../../../release/esm/vs/language/css/css.worker.js', import.meta.url),
+				new URL('../../../out/monaco-editor/esm/vs/language/css/css.worker.js', import.meta.url),
 				{ type: 'module' }
 			);
 		}
 		if (label === 'html' || label === 'handlebars' || label === 'razor') {
 			return new Worker(
-				new URL('../../../release/esm/vs/language/html/html.worker.js', import.meta.url),
+				new URL('../../../out/monaco-editor/esm/vs/language/html/html.worker.js', import.meta.url),
 				{ type: 'module' }
 			);
 		}
 		if (label === 'typescript' || label === 'javascript') {
 			return new Worker(
-				new URL('../../../release/esm/vs/language/typescript/ts.worker.js', import.meta.url),
+				new URL(
+					'../../../out/monaco-editor/esm/vs/language/typescript/ts.worker.js',
+					import.meta.url
+				),
 				{ type: 'module' }
 			);
 		}
-		return new Worker(new URL('../../../release/esm/vs/editor/editor.worker.js', import.meta.url), {
-			type: 'module'
-		});
+		return new Worker(
+			new URL('../../../out/monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url),
+			{
+				type: 'module'
+			}
+		);
 	}
 };
 

+ 6 - 6
test/smoke/vite/index.js

@@ -3,12 +3,12 @@
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 
-import * as monaco from '../../../release/esm/vs/editor/editor.main';
-import editorWorker from '../../../release/esm/vs/editor/editor.worker?worker';
-import jsonWorker from '../../../release/esm/vs/language/json/json.worker?worker';
-import cssWorker from '../../../release/esm/vs/language/css/css.worker?worker';
-import htmlWorker from '../../../release/esm/vs/language/html/html.worker?worker';
-import tsWorker from '../../../release/esm/vs/language/typescript/ts.worker?worker';
+import * as monaco from '../../../out/monaco-editor/esm/vs/editor/editor.main';
+import editorWorker from '../../../out/monaco-editor/esm/vs/editor/editor.worker?worker';
+import jsonWorker from '../../../out/monaco-editor/esm/vs/language/json/json.worker?worker';
+import cssWorker from '../../../out/monaco-editor/esm/vs/language/css/css.worker?worker';
+import htmlWorker from '../../../out/monaco-editor/esm/vs/language/html/html.worker?worker';
+import tsWorker from '../../../out/monaco-editor/esm/vs/language/typescript/ts.worker?worker';
 
 self.MonacoEnvironment = {
 	getWorker(moduleId, label) {

+ 4 - 4
test/unit/all.js

@@ -6,8 +6,8 @@ const path = require('path');
 requirejs.config({
 	baseUrl: '',
 	paths: {
-		'vs/fillers/monaco-editor-core': 'out/amd/fillers/monaco-editor-core-amd',
-		'vs/basic-languages': 'out/amd/basic-languages',
+		'vs/fillers/monaco-editor-core': 'out/languages/amd-tsc/fillers/monaco-editor-core-amd',
+		'vs/basic-languages': 'out/languages/amd-tsc/basic-languages',
 		vs: './node_modules/monaco-editor-core/dev/vs'
 	},
 	nodeRequire: require
@@ -38,7 +38,7 @@ requirejs(
 	['test/unit/setup'],
 	function () {
 		glob(
-			'out/amd/basic-languages/*/*.test.js',
+			'out/languages/amd-tsc/basic-languages/*/*.test.js',
 			{ cwd: path.join(__dirname, '../../') },
 			function (err, files) {
 				if (err) {
@@ -46,7 +46,7 @@ requirejs(
 					return;
 				}
 				requirejs(
-					files.map((f) => f.replace(/^out\/amd/, 'vs').replace(/\.js$/, '')),
+					files.map((f) => f.replace(/^out\/languages\/amd-tsc/, 'vs').replace(/\.js$/, '')),
 					function () {
 						run(); // We can launch the tests!
 					},

+ 66 - 66
webpack-plugin/package-lock.json

@@ -17,7 +17,7 @@
 				"glob": "^7.2.0",
 				"monaco-editor": "^0.32.0",
 				"style-loader": "^3.3.1",
-				"typescript": "^4.5.5",
+				"typescript": "^5.0.2",
 				"webpack": "^5.68.0",
 				"webpack-cli": "^4.9.2"
 			},
@@ -126,9 +126,9 @@
 			"dev": true
 		},
 		"node_modules/@types/node": {
-			"version": "17.0.23",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
-			"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
 			"dev": true
 		},
 		"node_modules/@webassemblyjs/ast": {
@@ -326,9 +326,9 @@
 			"dev": true
 		},
 		"node_modules/acorn": {
-			"version": "8.7.0",
-			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-			"integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+			"version": "8.8.2",
+			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+			"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
 			"dev": true,
 			"bin": {
 				"acorn": "bin/acorn"
@@ -554,9 +554,9 @@
 			}
 		},
 		"node_modules/enhanced-resolve": {
-			"version": "5.9.2",
-			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz",
-			"integrity": "sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==",
+			"version": "5.12.0",
+			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+			"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
 			"dev": true,
 			"dependencies": {
 				"graceful-fs": "^4.2.4",
@@ -770,9 +770,9 @@
 			"dev": true
 		},
 		"node_modules/graceful-fs": {
-			"version": "4.2.9",
-			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
-			"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
+			"version": "4.2.10",
+			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+			"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
 			"dev": true
 		},
 		"node_modules/has": {
@@ -926,10 +926,10 @@
 				"node": ">= 10.13.0"
 			}
 		},
-		"node_modules/json-parse-better-errors": {
-			"version": "1.0.2",
-			"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
-			"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+		"node_modules/json-parse-even-better-errors": {
+			"version": "2.3.1",
+			"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+			"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
 			"dev": true
 		},
 		"node_modules/json-schema-traverse": {
@@ -939,9 +939,9 @@
 			"dev": true
 		},
 		"node_modules/json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
 			"bin": {
 				"json5": "lib/cli.js"
 			},
@@ -1618,16 +1618,16 @@
 			}
 		},
 		"node_modules/typescript": {
-			"version": "4.6.3",
-			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
-			"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true,
 			"bin": {
 				"tsc": "bin/tsc",
 				"tsserver": "bin/tsserver"
 			},
 			"engines": {
-				"node": ">=4.2.0"
+				"node": ">=12.20"
 			}
 		},
 		"node_modules/uri-js": {
@@ -1646,9 +1646,9 @@
 			"dev": true
 		},
 		"node_modules/watchpack": {
-			"version": "2.3.1",
-			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
-			"integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+			"version": "2.4.0",
+			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+			"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
 			"dev": true,
 			"dependencies": {
 				"glob-to-regexp": "^0.4.1",
@@ -1659,9 +1659,9 @@
 			}
 		},
 		"node_modules/webpack": {
-			"version": "5.70.0",
-			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
-			"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
+			"version": "5.76.0",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+			"integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
 			"dev": true,
 			"dependencies": {
 				"@types/eslint-scope": "^3.7.3",
@@ -1669,24 +1669,24 @@
 				"@webassemblyjs/ast": "1.11.1",
 				"@webassemblyjs/wasm-edit": "1.11.1",
 				"@webassemblyjs/wasm-parser": "1.11.1",
-				"acorn": "^8.4.1",
+				"acorn": "^8.7.1",
 				"acorn-import-assertions": "^1.7.6",
 				"browserslist": "^4.14.5",
 				"chrome-trace-event": "^1.0.2",
-				"enhanced-resolve": "^5.9.2",
+				"enhanced-resolve": "^5.10.0",
 				"es-module-lexer": "^0.9.0",
 				"eslint-scope": "5.1.1",
 				"events": "^3.2.0",
 				"glob-to-regexp": "^0.4.1",
 				"graceful-fs": "^4.2.9",
-				"json-parse-better-errors": "^1.0.2",
+				"json-parse-even-better-errors": "^2.3.1",
 				"loader-runner": "^4.2.0",
 				"mime-types": "^2.1.27",
 				"neo-async": "^2.6.2",
 				"schema-utils": "^3.1.0",
 				"tapable": "^2.1.1",
 				"terser-webpack-plugin": "^5.1.3",
-				"watchpack": "^2.3.1",
+				"watchpack": "^2.4.0",
 				"webpack-sources": "^3.2.3"
 			},
 			"bin": {
@@ -1902,9 +1902,9 @@
 			"dev": true
 		},
 		"@types/node": {
-			"version": "17.0.23",
-			"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
-			"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
+			"version": "18.14.6",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz",
+			"integrity": "sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==",
 			"dev": true
 		},
 		"@webassemblyjs/ast": {
@@ -2089,9 +2089,9 @@
 			"dev": true
 		},
 		"acorn": {
-			"version": "8.7.0",
-			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-			"integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+			"version": "8.8.2",
+			"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+			"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
 			"dev": true
 		},
 		"acorn-import-assertions": {
@@ -2246,9 +2246,9 @@
 			"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
 		},
 		"enhanced-resolve": {
-			"version": "5.9.2",
-			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz",
-			"integrity": "sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==",
+			"version": "5.12.0",
+			"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+			"integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
 			"dev": true,
 			"requires": {
 				"graceful-fs": "^4.2.4",
@@ -2406,9 +2406,9 @@
 			"dev": true
 		},
 		"graceful-fs": {
-			"version": "4.2.9",
-			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
-			"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
+			"version": "4.2.10",
+			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+			"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
 			"dev": true
 		},
 		"has": {
@@ -2518,10 +2518,10 @@
 				"supports-color": "^8.0.0"
 			}
 		},
-		"json-parse-better-errors": {
-			"version": "1.0.2",
-			"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
-			"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+		"json-parse-even-better-errors": {
+			"version": "2.3.1",
+			"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+			"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
 			"dev": true
 		},
 		"json-schema-traverse": {
@@ -2531,9 +2531,9 @@
 			"dev": true
 		},
 		"json5": {
-			"version": "2.2.1",
-			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
-			"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
+			"version": "2.2.3",
+			"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+			"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
 		},
 		"kind-of": {
 			"version": "6.0.3",
@@ -2985,9 +2985,9 @@
 			}
 		},
 		"typescript": {
-			"version": "4.6.3",
-			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
-			"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+			"version": "5.0.2",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz",
+			"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==",
 			"dev": true
 		},
 		"uri-js": {
@@ -3006,9 +3006,9 @@
 			"dev": true
 		},
 		"watchpack": {
-			"version": "2.3.1",
-			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
-			"integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+			"version": "2.4.0",
+			"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+			"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
 			"dev": true,
 			"requires": {
 				"glob-to-regexp": "^0.4.1",
@@ -3016,9 +3016,9 @@
 			}
 		},
 		"webpack": {
-			"version": "5.70.0",
-			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
-			"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
+			"version": "5.76.0",
+			"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
+			"integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
 			"dev": true,
 			"requires": {
 				"@types/eslint-scope": "^3.7.3",
@@ -3026,24 +3026,24 @@
 				"@webassemblyjs/ast": "1.11.1",
 				"@webassemblyjs/wasm-edit": "1.11.1",
 				"@webassemblyjs/wasm-parser": "1.11.1",
-				"acorn": "^8.4.1",
+				"acorn": "^8.7.1",
 				"acorn-import-assertions": "^1.7.6",
 				"browserslist": "^4.14.5",
 				"chrome-trace-event": "^1.0.2",
-				"enhanced-resolve": "^5.9.2",
+				"enhanced-resolve": "^5.10.0",
 				"es-module-lexer": "^0.9.0",
 				"eslint-scope": "5.1.1",
 				"events": "^3.2.0",
 				"glob-to-regexp": "^0.4.1",
 				"graceful-fs": "^4.2.9",
-				"json-parse-better-errors": "^1.0.2",
+				"json-parse-even-better-errors": "^2.3.1",
 				"loader-runner": "^4.2.0",
 				"mime-types": "^2.1.27",
 				"neo-async": "^2.6.2",
 				"schema-utils": "^3.1.0",
 				"tapable": "^2.1.1",
 				"terser-webpack-plugin": "^5.1.3",
-				"watchpack": "^2.3.1",
+				"watchpack": "^2.4.0",
 				"webpack-sources": "^3.2.3"
 			}
 		},

+ 1 - 2
webpack-plugin/package.json

@@ -7,7 +7,6 @@
 	"scripts": {
 		"watch": "tsc -w -p tsconfig.json",
 		"compile": "tsc -p tsconfig.json",
-		"import-editor": "node ./scripts/import-editor.js",
 		"prepublishOnly": "npm run compile"
 	},
 	"repository": {
@@ -36,7 +35,7 @@
 		"glob": "^7.2.0",
 		"monaco-editor": "^0.32.0",
 		"style-loader": "^3.3.1",
-		"typescript": "^4.5.5",
+		"typescript": "^5.0.2",
 		"webpack": "^5.68.0",
 		"webpack-cli": "^4.9.2"
 	},

+ 7 - 3
webpack-plugin/src/loaders/include.ts

@@ -30,8 +30,12 @@ export const pitch: PitchLoaderDefinitionFunction<ILoaderOptions> = function pit
 		...(globals
 			? Object.keys(globals).map((key) => `self[${JSON.stringify(key)}] = ${globals[key]};`)
 			: []),
-		...pre.map((include: any) => `require(${stringifyRequest(include)});`),
-		`module.exports = require(${stringifyRequest(`!!${remainingRequest}`)});`,
-		...post.map((include: any) => `require(${stringifyRequest(include)});`)
+		...pre.map((include: any) => `import ${stringifyRequest(include)};`),
+		`
+import * as monaco from ${stringifyRequest(`!!${remainingRequest}`)};
+export * from ${stringifyRequest(`!!${remainingRequest}`)};
+export default monaco;
+		`,
+		...post.map((include: any) => `import ${stringifyRequest(include)};`)
 	].join('\n');
 };

+ 51 - 2
website/.gitignore

@@ -1,2 +1,51 @@
-node_modules/monaco-editor/dev
-node_modules/monaco-editor/esm
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules
+jspm_packages
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
+
+dist
+api
+
+dist/
+
+.npmrc
+
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.js

+ 6 - 0
website/.prettierrc.json

@@ -0,0 +1,6 @@
+{
+	"trailingComma": "es5",
+	"tabWidth": 4,
+	"semi": true,
+	"useTabs": true
+}

+ 0 - 302
website/all.css

@@ -1,302 +0,0 @@
-body {
-	padding: 54px 0 40px 0;
-	overflow-y: scroll;
-}
-
-body.home {
-	padding-top: 0;
-}
-
-body,
-input,
-button,
-select,
-textarea,
-.navbar-search .search-query {
-	font: 400 14px/1.4em 'Segoe UI', 'Open Sans', Calibri, Candara, Arial, sans-serif;
-}
-
-.navbar .nav {
-	float: left;
-	margin-right: 0;
-}
-
-a {
-	color: #0066cc;
-	cursor: pointer;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-	letter-spacing: -0.01em;
-	margin: 0;
-	line-height: normal;
-}
-
-/***** Bootstrap Cosmo Overrides *****/
-h1,
-h2 {
-	font-family: 'Segoe UI Light', 'Segoe UI', 'Open Sans', Calibri, Candara, Arial, sans-serif;
-	font-weight: 300;
-}
-h1 {
-	font-size: 72px;
-	letter-spacing: -0.02em;
-}
-
-.hero-unit h1 {
-	font-size: 48px;
-}
-
-h2 {
-	font-size: 26px;
-}
-
-h3 {
-	font-size: 26px;
-}
-
-h4 {
-	font-size: 16px;
-}
-
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
-	color: #999;
-}
-
-.alert-heading,
-.alert h1,
-.alert h2,
-.alert h3,
-.alert h4,
-.alert h5,
-.alert h6 {
-	color: inherit;
-}
-
-.alert-info {
-	color: #3a87ad;
-	background-color: #d9edf7;
-}
-
-.navbar-inverse .navbar-inner {
-	background-color: #68217a;
-	-webkit-filter: none;
-	filter: none;
-}
-
-.navbar-inverse.home .navbar-inner {
-	background-color: transparent;
-}
-
-.navbar-inverse .btn-navbar {
-	background: transparent;
-	margin-top: 14px;
-}
-
-.navbar-inverse .btn-navbar:hover,
-.navbar-inverse .btn-navbar:focus,
-.navbar-inverse .btn-navbar:active,
-.navbar-inverse .btn-navbar.active,
-.navbar-inverse .btn-navbar.disabled,
-.navbar-inverse .btn-navbar[disabled] {
-	background: #442359;
-}
-
-.btn-primary {
-	background-color: #0072c6;
-}
-
-.home .hero-unit {
-	margin-top: -54px;
-	position: relative;
-	z-index: 100;
-}
-
-.hero-unit {
-	font-weight: normal;
-}
-
-.hero-unit h1 {
-	margin: 0 0 6px;
-}
-
-.nav-tabs > li > a {
-	color: #999;
-}
-
-.nav-tabs > li > a:hover {
-	color: #555;
-}
-
-.nav-tabs > .active > a,
-.nav-tabs > .active > a:hover,
-.nav-tabs > .active > a:focus {
-	color: #0072c6;
-}
-
-/***** General *****/
-
-body > section > .container {
-	padding-top: 12px;
-}
-
-.masthead {
-	background-color: #0072c6;
-	color: white;
-}
-
-.masthead .hero-unit {
-	padding: 30px 0 0;
-	background: none;
-}
-
-.navbar.home {
-	position: relative;
-	z-index: 500;
-}
-
-.navbar .nav > li > a {
-	text-shadow: none;
-	padding-top: 18px;
-	font-size: 14px;
-	text-transform: uppercase;
-}
-
-.navbar-inverse .nav-collapse .nav > li > a {
-	color: white;
-	padding-left: 0;
-}
-
-.navbar-inverse .nav > li > a.nav-item:focus,
-.navbar-inverse .nav > li > a.nav-item:hover {
-	background-color: rgba(0, 0, 0, 0.12);
-}
-
-.navbar-inverse .nav .active > a.nav-item,
-.navbar-inverse .nav .active > a.nav-item:hover,
-.navbar-inverse .nav .active > a.nav-item:focus {
-	color: #fff;
-	background-color: rgba(0, 0, 0, 0.24);
-	-webkit-box-shadow: none;
-	box-shadow: none;
-}
-
-.navbar .logo {
-	/*background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTIxIDBsLTExIDEyLTcuMzMzLTUuNjY2LTIuNjY3IDEuNjgydjEzLjk4NGwyLjY2NyAxLjY2NiA3LjMzMy01LjY2NiAxMSAxMSA3LTN2LTIyLjMzM2wtNy0zLjY2N3ptLTE4IDE5di05bDQgNS00IDR6bTExLTRsNy02djEybC03LTZ6Ii8+PC9zdmc+") left center no-repeat;*/
-	/*padding: 16px 12px 0 34px;*/
-	padding: 16px 12px 0 0px;
-	height: 35px;
-	display: block;
-	float: left;
-}
-
-.navbar .logo a {
-	color: #fff;
-	font-size: 24px;
-	letter-spacing: -1px;
-}
-
-.navbar-fixed-top {
-	z-index: 500;
-}
-
-.flgroup:after {
-	content: '';
-	display: block;
-	visibility: hidden;
-	height: 0;
-	clear: both;
-}
-
-/* Controls */
-
-/* Media Queries */
-@media (min-width: 1200px) {
-	h1,
-	h2 {
-		letter-spacing: -0.04em;
-	}
-
-	.hero-unit h1 {
-		font-size: 72px;
-	}
-
-	h2 {
-		font-size: 36px;
-	}
-}
-
-#gh-link {
-	display: none;
-	position: fixed;
-	top: 0;
-	right: 0;
-	border: 0;
-	margin: 0;
-	z-index: 1000;
-}
-@media (min-width: 980px) {
-	#gh-link {
-		display: block;
-	}
-}
-
-@media (min-width: 980px) {
-	.navbar .nav {
-		float: right;
-	}
-
-	.navbar-inverse .nav-collapse .nav > li > a {
-		padding-left: 15px;
-	}
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
-	h1 {
-		letter-spacing: -0.02em;
-	}
-}
-
-@media (max-width: 979px) {
-	body {
-		padding: inherit;
-	}
-
-	.navbar-fixed-top,
-	.navbar-fixed-bottom,
-	.navbar-static-top {
-		margin-right: inherit;
-		margin-left: inherit;
-		margin-bottom: 0;
-	}
-
-	.navbar-fixed-top .navbar-inner {
-		padding: 0 20px;
-	}
-
-	.navbar .container {
-		width: 724px;
-	}
-}
-
-@media (max-width: 767px) {
-	.navbar .container {
-		width: 100%;
-	}
-}
-
-@media (max-width: 480px) {
-	.navbar .logo a {
-		display: none;
-	}
-}

BIN
website/fork.png


+ 0 - 229
website/index.html

@@ -1,229 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-		<meta name="viewport" content="width=device-width" />
-
-		<title>Monaco Editor</title>
-
-		<link data-inline="yes-please" href="./lib/bootstrap-cosmo.css" rel="stylesheet" />
-		<link data-inline="yes-please" href="./lib/bootstrap-responsive.min.css" rel="stylesheet" />
-		<link data-inline="yes-please" href="./all.css" rel="stylesheet" />
-		<link data-inline="yes-please" href="./index/index.css" rel="stylesheet" />
-
-		<link
-			data-name="vs/editor/editor.main"
-			rel="stylesheet"
-			href="../release/dev/vs/editor/editor.main.css"
-		/>
-	</head>
-
-	<body>
-		<pre data-preload="index/samples/sample.typescript.txt"></pre>
-		<pre data-preload="index/samples/diff.lhs.txt"></pre>
-		<pre data-preload="index/samples/diff.rhs.txt"></pre>
-		<a id="gh-link" href="https://github.com/microsoft/monaco-editor"
-			><img width="149" height="149" alt="Fork me on GitHub" src="./fork.png"
-		/></a>
-		<nav class="navbar navbar-inverse navbar-fixed-top">
-			<div class="navbar-inner">
-				<div class="container">
-					<div class="logo">
-						<a href="index.html">Monaco Editor</a>
-					</div>
-					<!-- collapse button for smaller screens -->
-					<button
-						type="button"
-						class="btn btn-navbar"
-						data-toggle="collapse"
-						data-target=".nav-collapse"
-					>
-						<span class="icon-bar"></span>
-						<span class="icon-bar"></span>
-						<span class="icon-bar"></span>
-					</button>
-
-					<!-- navbar title -->
-					<div class="nav-collapse collapse">
-						<ul class="nav">
-							<li><a class="nav-item" href="index.html">Home</a></li>
-							<li><a class="nav-item" href="api/index.html">API Doc</a></li>
-							<li><a class="nav-item" href="playground.html">Playground</a></li>
-							<li><a class="nav-item" href="monarch.html">Monarch</a></li>
-							<li>
-								<a
-									class="nav-item"
-									target="_blank"
-									href="https://registry.npmjs.org/monaco-editor/-/monaco-editor-{{version}}.tgz"
-									>Download {{version}}</a
-								>
-							</li>
-						</ul>
-					</div>
-				</div>
-			</div>
-		</nav>
-		<section class="try">
-			<div class="container">
-				<h3>About</h3>
-				<div class="row">
-					<div class="span12">
-						<br />
-						<p>
-							The Monaco Editor is the code editor that powers
-							<a href="https://github.com/microsoft/vscode">VS Code</a>. A good page describing the
-							code editor's features is
-							<a href="https://code.visualstudio.com/docs/editor/editingevolved">here</a>.
-						</p>
-
-						<p>
-							It is licensed under the MIT License and supports Edge, Chrome, Firefox, Safari and
-							Opera.
-						</p>
-
-						<p>
-							The Monaco editor is
-							<span style="font-weight: bold; color: #ff5722">not</span>
-							supported in mobile browsers or mobile web frameworks.
-						</p>
-
-						<p>
-							Find more information at the
-							<a href="https://github.com/microsoft/monaco-editor">Monaco Editor repo</a>.
-						</p>
-					</div>
-				</div>
-				<hr />
-				<h3>Download v{{version}}</h3>
-				<div class="row">
-					<div class="span12">
-						<br />
-						<p>The latest released version is <strong>{{version}}</strong>.</p>
-						<p>
-							Download with this direct
-							<a
-								target="_blank"
-								href="https://registry.npmjs.org/monaco-editor/-/monaco-editor-{{version}}.tgz"
-								>download link</a
-							>
-							or
-							<a href="https://www.npmjs.com/package/monaco-editor">from npm</a>:
-						</p>
-						<pre style="color: black">npm install monaco-editor@{{version}}</pre>
-					</div>
-				</div>
-				<hr />
-				<h3>Editor</h3>
-				<div class="editor row">
-					<div class="span3">
-						<h4
-							title="Syntax colorization plus support for errors, warnings, IntelliSense, formatting and outlining"
-						>
-							Rich IntelliSense, Validation
-						</h4>
-						<p>TypeScript, JavaScript, CSS, LESS, SCSS, JSON, HTML</p>
-						<br />
-						<h4 title="Syntax colorization">Basic Syntax Colorization</h4>
-						<p>
-							XML, PHP, C#, C++, Razor, Markdown, Diff, Java, VB, CoffeeScript, Handlebars, Batch,
-							Pug, F#, Lua, Powershell, Python, Ruby, SASS, R, Objective-C
-						</p>
-						<br />
-						<p>
-							Colorizers are implemented using
-							<a href="monarch.html" target="_blank">Monarch</a>.
-						</p>
-					</div>
-					<div class="span9">
-						<div class="row">
-							<div class="span4">
-								<label class="control-label">Language</label>
-								<select class="language-picker"></select>
-							</div>
-							<div class="span4">
-								<label class="control-label">Theme</label>
-								<select class="theme-picker">
-									<option>Visual Studio</option>
-									<option>Visual Studio Dark</option>
-									<option>High Contrast Dark</option>
-								</select>
-							</div>
-						</div>
-						<div class="editor-frame">
-							<div class="loading editor" style="display: none">
-								<div class="progress progress-striped active">
-									<div class="bar"></div>
-								</div>
-							</div>
-							<div id="editor"></div>
-						</div>
-					</div>
-				</div>
-				<hr />
-				<h3>Diff Editor</h3>
-				<div class="editor row">
-					<div class="span3">
-						<h4 title="As you type diffing for all supported languages">
-							Side by side live comparison
-						</h4>
-						<p>Supports all languages out of the box</p>
-					</div>
-					<div class="span9">
-						<div class="row">
-							<div class="span8">
-								<div class="checkbox">
-									<label class="control-label">
-										<input id="inline-diff-checkbox" type="checkbox" value="" />
-										Inline diff
-									</label>
-								</div>
-							</div>
-						</div>
-						<div class="editor-frame">
-							<div class="loading diff-editor" style="display: none">
-								<div class="progress progress-striped active">
-									<div class="bar"></div>
-								</div>
-							</div>
-							<div id="diff-editor"></div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</section>
-
-		<footer class="container">
-			<hr />
-			<p class="text-center">
-				<a href="https://microsoft.com" title="Microsoft">
-					<img
-						src="https://opensource.microsoft.com/assets/images/Microsoft_logo.svg"
-						alt="Microsoft"
-						style="max-height: 23px; margin-bottom: 12px"
-					/>
-				</a>
-				<br />
-				<small>&copy; {{year}} Microsoft</small>
-			</p>
-		</footer>
-
-		<script
-			src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"
-			integrity="sha256-wS9gmOZBqsqWxgIVgA8Y9WcQOa7PgSIX+rPA0VL2rbQ="
-			crossorigin="anonymous"
-		></script>
-		<script
-			src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/bootstrap.min.js"
-			integrity="sha256-u+l2mGjpmGK/mFgUncmMcFKdMijvV+J3odlDJZSNUu8="
-			crossorigin="anonymous"
-		></script>
-
-		<script>
-			var require = { paths: { vs: '../release/dev/vs' } };
-		</script>
-		<script src="../release/dev/vs/loader.js"></script>
-		<script src="../release/dev/vs/editor/editor.main.nls.js"></script>
-		<script src="../release/dev/vs/editor/editor.main.js"></script>
-		<script data-inline="yes-please" src="./index/index.js"></script>
-	</body>
-</html>

+ 0 - 258
website/index/index.css

@@ -1,258 +0,0 @@
-.try .drops {
-	margin: 0;
-	list-style: none;
-	float: right;
-}
-
-.try .drops li {
-	float: left;
-	width: auto;
-	height: auto;
-	text-indent: 0;
-	font-size: 26px;
-	line-height: normal;
-	margin: 0 12px;
-	cursor: pointer;
-}
-
-.try .drops li a:hover,
-.try .drops li a:focus {
-	text-decoration: none;
-}
-
-.try .drops li h4 {
-	color: #999;
-}
-
-.try .drops li.active h4,
-.try .drops li.active:hover h4 {
-	color: #0072c6;
-}
-
-.try .drops li:hover h4 {
-	color: rgba(0, 114, 198, 0.5);
-}
-
-.try .editor.row {
-	padding: 18px 0;
-}
-
-.try .row h4 {
-	padding-bottom: 6px;
-}
-
-.try .tile {
-	position: relative;
-	height: 72px;
-	border: 1px solid #ddd;
-	text-align: right;
-	overflow: hidden;
-	cursor: pointer;
-
-	-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-	-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-
-	-webkit-box-sizing: border-box;
-	-o-box-sizing: border-box;
-	-moz-box-sizing: border-box;
-	-ms-box-sizing: border-box;
-	box-sizing: border-box;
-}
-
-.try .tile:hover {
-	-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-	-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-}
-
-.try .tile h4 {
-	margin: 0;
-	position: absolute;
-	right: 12px;
-	bottom: 12px;
-	z-index: 1;
-}
-
-.try .tile .glyph {
-	position: absolute;
-	left: 12px;
-	bottom: -6px;
-	background: url('../img/cloud.png') no-repeat;
-	background-size: 80px 43px;
-	height: 43px;
-	width: 80px;
-
-	opacity: 0.5;
-	transition: opacity 0.5s ease, bottom 0.5s ease;
-	-webkit-transition: opacity 0.5s ease, bottom 0.5s ease;
-}
-
-.try .tile:hover .glyph {
-	opacity: 1;
-	bottom: -2px;
-}
-
-.try .editor.row h4 small {
-	color: #555;
-}
-
-.try .editor.row .control-label {
-	display: inline-block;
-	position: relative;
-	top: -4px;
-	margin-right: 4px;
-}
-
-.try .editor.row .monaco-editor .find-widget input[type='text'] {
-	margin-bottom: 0;
-	-webkit-box-shadow: none;
-	-moz-box-shadow: none;
-	box-shadow: none;
-	-webkit-transition: none;
-	-moz-transition: none;
-	-o-transition: none;
-	transition: none;
-}
-
-.try .editor.row .monaco-editor .find-widget .monaco-checkbox .label {
-	min-height: 20px;
-	min-width: 20px;
-}
-
-.try .editor.row .monaco-editor .find-widget .close {
-	float: none;
-	opacity: 1;
-}
-
-.try .editor .editor-frame {
-	position: relative;
-}
-
-.try .editor .editor-frame #editor,
-.try .editor .editor-frame #diff-editor {
-	height: 400px;
-	margin-bottom: 10px;
-	border: 1px solid #eee;
-}
-
-.try .editor .editor-frame .loading {
-	position: absolute;
-	height: 100%;
-	width: 100%;
-	background-color: rgba(255, 255, 255, 0.5);
-	margin: 0 auto;
-	display: none;
-	z-index: 100;
-}
-
-.try .editor .editor-frame .progress {
-	width: 50%;
-	margin: 15% auto 0;
-}
-
-.try .editor .editor-frame .progress .bar {
-	width: 100%;
-	background-color: #4bb1cf;
-}
-
-.try .editor .editor-frame #editor .alert,
-.try .editor .editor-frame #diff-editor .alert {
-	margin: 18% auto 0;
-	width: 30%;
-	text-align: center;
-	color: #b94a48;
-	background-color: #f2dede;
-	border-color: #eed3d7;
-}
-
-.try .editor #editor .monaco-editor .row,
-.try .editor #diff-editor .monaco-editor .row {
-	margin-left: 0;
-}
-
-.try .editor .vs.monaco-editor .context-view.monaco-menu-container a {
-	color: #646465;
-}
-
-.try .editor .vs-dark.monaco-editor .context-view.monaco-menu-container a {
-	color: #bbb;
-}
-
-@media (min-width: 1200px) {
-	.try .editor .row {
-		margin-left: 0px;
-	}
-}
-
-@media (max-width: 767px) {
-	.try .container {
-		margin: 0 24px;
-	}
-
-	.try .tile h4 {
-		right: 6px;
-	}
-
-	.try .editor > .span9 .row .span4 {
-		float: left;
-		width: 50%;
-	}
-
-	.try .editor h4 {
-		margin-top: 0;
-	}
-}
-
-@media (max-width: 520px) {
-	.try .editor > .span3 p,
-	.try .editor > .span3 h4 {
-		display: none;
-	}
-}
-
-@media (max-width: 320px) {
-	.try .editor > .span9 {
-		display: none;
-	}
-}
-
-/* ------- BEGIN bootstrap fixes for the editor ------- */
-
-.monaco-editor .container:before,
-.monaco-editor .row:before {
-	content: '';
-	display: inherit;
-}
-
-.monaco-editor .container:after,
-.monaco-editor .row:after {
-	clear: inherit;
-}
-
-.monaco-editor .container {
-	width: auto;
-	margin: inherit;
-	padding: inherit;
-}
-
-.monaco-editor .close {
-	float: none;
-	font-size: inherit;
-	font-weight: inherit;
-	line-height: inherit;
-	color: inherit;
-	text-shadow: inherit;
-	opacity: inherit;
-	filter: inherit;
-}
-
-.monaco-editor .row {
-	margin: inherit;
-}
-
-.monaco-editor .invisible {
-	visibility: visible;
-}
-
-/* ------- END bootstrap fixes for the editor ------- */

+ 0 - 174
website/index/index.js

@@ -1,174 +0,0 @@
-/// <reference path="../../release/monaco.d.ts" />
-
-'use strict';
-
-var editor = null,
-	diffEditor = null;
-
-$(document).ready(function () {
-	require(['vs/editor/editor.main'], function () {
-		var MODES = (function () {
-			var modesIds = monaco.languages.getLanguages().map(function (lang) {
-				return lang.id;
-			});
-			modesIds.sort();
-
-			return modesIds.map(function (modeId) {
-				return {
-					modeId: modeId,
-					sampleURL: 'index/samples/sample.' + modeId + '.txt'
-				};
-			});
-		})();
-
-		var startModeIndex = 0;
-		for (var i = 0; i < MODES.length; i++) {
-			var o = document.createElement('option');
-			o.textContent = MODES[i].modeId;
-			if (MODES[i].modeId === 'typescript') {
-				startModeIndex = i;
-			}
-			$('.language-picker').append(o);
-		}
-		$('.language-picker')[0].selectedIndex = startModeIndex;
-		loadSample(MODES[startModeIndex]);
-		$('.language-picker').change(function () {
-			loadSample(MODES[this.selectedIndex]);
-		});
-
-		$('.theme-picker').change(function () {
-			changeTheme(this.selectedIndex);
-		});
-
-		loadDiffSample();
-
-		$('#inline-diff-checkbox').change(function () {
-			diffEditor.updateOptions({
-				renderSideBySide: !$(this).is(':checked')
-			});
-		});
-	});
-
-	window.onresize = function () {
-		if (editor) {
-			editor.layout();
-		}
-		if (diffEditor) {
-			diffEditor.layout();
-		}
-	};
-});
-
-var preloaded = {};
-(function () {
-	var elements = Array.prototype.slice.call(document.querySelectorAll('pre[data-preload]'), 0);
-
-	elements.forEach(function (el) {
-		var path = el.getAttribute('data-preload');
-		preloaded[path] = el.innerText || el.textContent;
-		el.parentNode.removeChild(el);
-	});
-})();
-
-function xhr(url, cb) {
-	if (preloaded[url]) {
-		return cb(null, preloaded[url]);
-	}
-	$.ajax({
-		type: 'GET',
-		url: url,
-		dataType: 'text',
-		error: function () {
-			cb(this, null);
-		}
-	}).done(function (data) {
-		cb(null, data);
-	});
-}
-
-function loadSample(mode) {
-	$('.loading.editor').show();
-	xhr(mode.sampleURL, function (err, data) {
-		if (err) {
-			if (editor) {
-				if (editor.getModel()) {
-					editor.getModel().dispose();
-				}
-				editor.dispose();
-				editor = null;
-			}
-			$('.loading.editor').fadeOut({ duration: 200 });
-			$('#editor').empty();
-			$('#editor').append(
-				'<p class="alert alert-error">Failed to load ' + mode.modeId + ' sample</p>'
-			);
-			return;
-		}
-
-		if (!editor) {
-			$('#editor').empty();
-			editor = monaco.editor.create(document.getElementById('editor'), {
-				model: null
-			});
-		}
-
-		var oldModel = editor.getModel();
-		var newModel = monaco.editor.createModel(data, mode.modeId);
-		editor.setModel(newModel);
-		if (oldModel) {
-			oldModel.dispose();
-		}
-		$('.loading.editor').fadeOut({ duration: 300 });
-	});
-}
-
-function loadDiffSample() {
-	var onError = function () {
-		$('.loading.diff-editor').fadeOut({ duration: 200 });
-		$('#diff-editor').append('<p class="alert alert-error">Failed to load diff editor sample</p>');
-	};
-
-	$('.loading.diff-editor').show();
-
-	var lhsData = null,
-		rhsData = null,
-		jsMode = null;
-
-	xhr('index/samples/diff.lhs.txt', function (err, data) {
-		if (err) {
-			return onError();
-		}
-		lhsData = data;
-		onProgress();
-	});
-	xhr('index/samples/diff.rhs.txt', function (err, data) {
-		if (err) {
-			return onError();
-		}
-		rhsData = data;
-		onProgress();
-	});
-
-	function onProgress() {
-		if (lhsData && rhsData) {
-			diffEditor = monaco.editor.createDiffEditor(document.getElementById('diff-editor'), {
-				enableSplitViewResizing: false
-			});
-
-			var lhsModel = monaco.editor.createModel(lhsData, 'text/javascript');
-			var rhsModel = monaco.editor.createModel(rhsData, 'text/javascript');
-
-			diffEditor.setModel({
-				original: lhsModel,
-				modified: rhsModel
-			});
-
-			$('.loading.diff-editor').fadeOut({ duration: 300 });
-		}
-	}
-}
-
-function changeTheme(theme) {
-	var newTheme = theme === 1 ? 'vs-dark' : theme === 0 ? 'vs' : 'hc-black';
-	monaco.editor.setTheme(newTheme);
-}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff