Skip to content

Commit

Permalink
Lexer for the WebGPU Shading Language (#2386)
Browse files Browse the repository at this point in the history
See https://w3.org/TR/WGSL

Further work is needed to refine it:
- treat context-dependent names specially
- treat template start and template end tokens specially, perhaps

Fixes: #2388
  • Loading branch information
dneto0 committed Mar 30, 2023
1 parent e8fe38f commit 5175d68
Show file tree
Hide file tree
Showing 18 changed files with 2,782 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ Other contributors, listed alphabetically, are:
* Mher Movsisyan -- DTD lexer
* Dejan Muhamedagic -- Crmsh lexer
* Ana Nelson -- Ragel, ANTLR, R console lexers
* David Neto, Google LLC -- WebGPU Shading Language lexer
* Kurt Neufeld -- Markdown lexer
* Nam T. Nguyen -- Monokai style
* Jesper Noehr -- HTML formatter "anchorlinenos"
Expand Down
1 change: 1 addition & 0 deletions pygments/lexers/_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@
'WDiffLexer': ('pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()),
'WatLexer': ('pygments.lexers.webassembly', 'WebAssembly', ('wast', 'wat'), ('*.wat', '*.wast'), ()),
'WebIDLLexer': ('pygments.lexers.webidl', 'Web IDL', ('webidl',), ('*.webidl',), ()),
'WgslLexer': ('pygments.lexers.wgsl', 'WebGPU Shading Language', ('wgsl',), ('*.wgsl',), ('text/wgsl',)),
'WhileyLexer': ('pygments.lexers.whiley', 'Whiley', ('whiley',), ('*.whiley',), ('text/x-whiley',)),
'WoWTocLexer': ('pygments.lexers.wowtoc', 'World of Warcraft TOC', ('wowtoc',), ('*.toc',), ()),
'WrenLexer': ('pygments.lexers.wren', 'Wren', ('wren',), ('*.wren',), ()),
Expand Down

0 comments on commit 5175d68

Please sign in to comment.