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.pull/3887/head
parent
14a92401d7
commit
fb47a0f545
|
@ -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…
Reference in New Issue