Skip to content

Commit

Permalink
Add WebGPU Shading Language tokenizer, with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dneto0 committed Apr 3, 2023
1 parent 689a4b8 commit 096d751
Show file tree
Hide file tree
Showing 5 changed files with 4,475 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/basic-languages/monaco.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,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';
24 changes: 24 additions & 0 deletions src/basic-languages/wgsl/wgsl.contribution.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Google LLC. 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');
}
}
});

0 comments on commit 096d751

Please sign in to comment.