Skip to content

Commit

Permalink
Revert wrong way of doing that.
Browse files Browse the repository at this point in the history
  • Loading branch information
thesoftwarephilosopher committed Aug 22, 2024
1 parent b60eefe commit 0681695
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions site/token-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* 1. `...` is highlighted as a keyword
* 2. `export/etc` are highlighted as control-flow keywords
* 3. Class fields are highlighted as variables
* 4. Type params are highlighted separate from JSX
*
*/

Expand Down Expand Up @@ -77,20 +76,12 @@ export const tokenProvider = {
common: [
// identifiers and keywords
[
/(#?[a-z_$][\w$]*)([<(]?)/,
/#?[a-z_$][\w$]*/,
{
cases: {
'@ctrlKeywords': 'keyword.flow',
'@keywords': 'keyword',
'super\\(': 'keyword',
'constructor\\(': 'keyword',
'@default': {
cases: {
'$2==<': ['method', { token: '@brackets', next: '@typeparams' }],
'$2==(': ['method', ''],
'@default': 'identifier',
}
},
'@default': 'identifier',
}
}
],
Expand Down Expand Up @@ -141,11 +132,6 @@ export const tokenProvider = {
[/`/, 'string', '@string_backtick']
],

typeparams: [
[/>/, '@brackets', '@pop'],
{ include: 'common' }
],

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

0 comments on commit 0681695

Please sign in to comment.