Skip to content

Commit

Permalink
Dot was the wrong place for calls/properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarephilosopher committed Aug 22, 2024
1 parent ce46d5b commit db1e42c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions site/token-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export const tokenProvider = {
],
[/[A-Z][\w\$]*/, 'type.identifier'],

// [/#?[\w$]+\s*(?=[<(])/, 'method'],
// [/#?[\w$]+\s*(?=[=.])/, 'property'],

// whitespace
{ include: '@whitespace' },

Expand Down Expand Up @@ -118,10 +121,9 @@ export const tokenProvider = {
[/0[bB](@binarydigits)n?/, 'number.binary'],
[/(@digits)n?/, 'number'],

[/\./, '@rematch', '@dot'],

// delimiter: after number because of .\d floats
[/[;,]/, 'delimiter'],
[/\.\.\./, 'keyword'],
[/[;,.]/, 'delimiter'],

// strings
[/"([^"\\]|\\.)*$/, 'string.invalid'], // non-teminated string
Expand All @@ -131,14 +133,6 @@ export const tokenProvider = {
[/`/, 'string', '@string_backtick']
],

dot: [
[/\.\.\./, 'keyword', '@pop'],
[/#?[\w$]+\s*(?=[<(])/, 'method'],
[/#?[\w$]+\s*(?=[=.])/, 'property'],
[/\./, 'delimiter'],
[/./, '@rematch', '@pop'],
],

whitespace: [
[/[ \t\r\n]+/, ''],
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
Expand Down

0 comments on commit db1e42c

Please sign in to comment.