Skip to content

Commit

Permalink
feat(ast-spec): use PunctuatorTokenToText for PunctuatorToken's `…
Browse files Browse the repository at this point in the history
…value` type
  • Loading branch information
MichaelDeBoey committed Jun 13, 2021
1 parent 94e2402 commit 17eaa17
Showing 1 changed file with 4 additions and 60 deletions.
64 changes: 4 additions & 60 deletions packages/ast-spec/src/token/PunctuatorToken/spec.ts
@@ -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>;
}

0 comments on commit 17eaa17

Please sign in to comment.