Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ast-spec): use
PunctuatorTokenToText
for PunctuatorToken
's `…
…value` type
- Loading branch information
1 parent
71ab319
commit 9f15199
Showing
1 changed file
with
4 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,12 @@ | ||
import type { AST_TOKEN_TYPES } from '../../ast-token-types'; | ||
import type { BaseToken } from '../../base/BaseToken'; | ||
import type { PunctuatorTokenToText } from './PunctuatorTokenToText'; | ||
|
||
export * from './PunctuatorTokenToText'; | ||
|
||
type ValueOf<T> = T[keyof T]; | ||
|
||
export interface PunctuatorToken extends BaseToken { | ||
type: AST_TOKEN_TYPES.Punctuator; | ||
value: | ||
| '--' | ||
| '-' | ||
| '-=' | ||
| ',' | ||
| ';' | ||
| ':' | ||
| '!' | ||
| '!=' | ||
| '!==' | ||
| '??' | ||
| '??=' | ||
| '?.' | ||
| '?' | ||
| '...' | ||
| '.' | ||
| '(' | ||
| ')' | ||
| '[' | ||
| ']' | ||
| '{' | ||
| '}' | ||
| '@' | ||
| '*' | ||
| '**' | ||
| '**=' | ||
| '*=' | ||
| '/' | ||
| '/=' | ||
| '&' | ||
| '&&' | ||
| '&&=' | ||
| '&=' | ||
| '%' | ||
| '%=' | ||
| '^' | ||
| '^=' | ||
| '+' | ||
| '++' | ||
| '+=' | ||
| '<' | ||
| '</' | ||
| '<<' | ||
| '<<=' | ||
| '<=' | ||
| '=' | ||
| '==' | ||
| '===' | ||
| '=>' | ||
| '>' | ||
| '>=' | ||
| '>>' | ||
| '>>=' | ||
| '>>>' | ||
| '>>>=' | ||
| '|' | ||
| '|=' | ||
| '||' | ||
| '||=' | ||
| '~'; | ||
value: ValueOf<PunctuatorTokenToText>; | ||
} |