mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Avoid a hack in the WGSL lexer
This is a non-functioal change. The current rule for delimiters was silly: it should have been a character class range (e.g. [ ... ]). Move delimiter handling into the symbols matcher.
This commit is contained in:
parent
14a92401d7
commit
fb47a0f545
1 changed files with 1 additions and 3 deletions
|
|
@ -377,7 +377,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
predeclared_intrinsics,
|
predeclared_intrinsics,
|
||||||
operators,
|
operators,
|
||||||
|
|
||||||
symbols: /[!%&*+\-\.\/:;<=>^|_~]+/,
|
symbols: /[!%&*+\-\.\/:;<=>^|_~,]+/,
|
||||||
|
|
||||||
tokenizer: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
|
|
@ -402,8 +402,6 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
{ include: '@commentOrSpace' },
|
{ include: '@commentOrSpace' },
|
||||||
{ include: '@numbers' },
|
{ include: '@numbers' },
|
||||||
|
|
||||||
[/;:\./, 'delimiter'],
|
|
||||||
[/,/, 'delimiter'], // Hack: Should be in previous rule
|
|
||||||
[/[{}()\[\]]/, '@brackets'],
|
[/[{}()\[\]]/, '@brackets'],
|
||||||
['@', 'annotation', '@attribute'],
|
['@', 'annotation', '@attribute'],
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue