Skip to content

Commit

Permalink
fix(parser): added 'onComment' types
Browse files Browse the repository at this point in the history
  • Loading branch information
KFlash committed Jul 22, 2019
1 parent 27850b9 commit 3ce01f3
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 55 deletions.
7 changes: 6 additions & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Token, KeywordDescTable } from './token';
import { Errors, report } from './errors';
import { Node } from './estree';
import { Node, Comment } from './estree';
import { nextToken } from './lexer/scan';

export const presetBlockIdentifiers: { [key: string]: string } = {
Expand Down Expand Up @@ -161,6 +161,11 @@ export const enum ScopeKind {
FunctionParams = 1 << 16
}

/**
* The type of the `onComment` option.
*/
export type OnComment = void | Comment[] | ((type: string, value: string, start?: number, end?: number) => any);

/**
* Lexical scope interface
*/
Expand Down
1 change: 0 additions & 1 deletion src/estree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface Position {
}

export type Labels = any; // Fix!
export type Scope = any; // Fix!

export type IdentifierOrExpression = Identifier | Expression | ArrowFunctionExpression;

Expand Down

0 comments on commit 3ce01f3

Please sign in to comment.