123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- import "./chunk-2LSFTFF7.js";
- // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/wgsl/wgsl.js
- var conf = {
- comments: {
- lineComment: "//",
- blockComment: ["/*", "*/"]
- },
- brackets: [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"]
- ],
- autoClosingPairs: [
- { open: "[", close: "]" },
- { open: "{", close: "}" },
- { open: "(", close: ")" }
- ],
- surroundingPairs: [
- { open: "{", close: "}" },
- { open: "[", close: "]" },
- { open: "(", close: ")" }
- ]
- };
- function qw(str) {
- let result = [];
- 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;
- }
- var atoms = qw("true false");
- var 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
- `);
- var 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
- `);
- var 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
- `);
- var 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
- `);
- var 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
- `);
- var 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
- `);
- var 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
- `);
- var operators = qw(`
- &
- &&
- ->
- /
- =
- ==
- !=
- >
- >=
- <
- <=
- %
- -
- --
- +
- ++
- |
- ||
- *
- <<
- >>
- +=
- -=
- *=
- /=
- %=
- &=
- |=
- ^=
- >>=
- <<=
- `);
- var directive_re = /enable|requires|diagnostic/;
- var ident_re = /[_\p{XID_Start}]\p{XID_Continue}*/u;
- var predefined_token = "variable.predefined";
- var language = {
- 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"],
- [
- 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" },
- [/;:\./, "delimiter"],
- [/,/, "delimiter"],
- [/[{}()\[\]]/, "@brackets"],
- ["@", "annotation", "@attribute"],
- [
- /@symbols/,
- {
- cases: {
- "@operators": "operator",
- "@default": "delimiter"
- }
- }
- ],
- [/./, "invalid"]
- ],
- commentOrSpace: [
- [/\s+/, "white"],
- [/\/\*/, "comment", "@blockComment"],
- [/\/\/.*$/, "comment"]
- ],
- blockComment: [
- [/[^\/*]+/, "comment"],
- [/\/\*/, "comment", "@push"],
- [/\*\//, "comment", "@pop"],
- [/[\/*]/, "comment"]
- ],
- attribute: [
- { include: "@commentOrSpace" },
- [/\w+/, "annotation", "@pop"]
- ],
- directive: [
- { include: "@commentOrSpace" },
- [/[()]/, "@brackets"],
- [/,/, "delimiter"],
- [ident_re, "meta.content"],
- [/;/, "delimiter", "@pop"]
- ],
- numbers: [
- [/0[fh]/, "number.float"],
- [/[1-9][0-9]*[fh]/, "number.float"],
- [/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/, "number.float"],
- [/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/, "number.float"],
- [/[0-9]+[eE][+-]?[0-9]+[fh]?/, "number.float"],
- [/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"],
- [/0[xX][0-9a-fA-F]+[iu]?/, "number.hex"],
- [/[1-9][0-9]*[iu]?/, "number"],
- [/0[iu]?/, "number"]
- ]
- }
- };
- export {
- conf,
- language
- };
- /*! Bundled license information:
- monaco-editor/esm/vs/basic-languages/wgsl/wgsl.js:
- (*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*)
- */
- //# sourceMappingURL=wgsl-5RK3VJZI.js.map
|