-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync language TS definitions with Flow
- Loading branch information
Jackson Kearl
committed
Aug 22, 2019
1 parent
7b389be
commit c10a670
Showing
8 changed files
with
178 additions
and
87 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Location } from '../language/ast'; | ||
import { Source } from '../language/source'; | ||
import { SourceLocation } from '../language/location'; | ||
|
||
/** | ||
* Render a helpful description of the location in the GraphQL Source document. | ||
*/ | ||
export function printLocation(location: Location): string; | ||
|
||
/** | ||
* Render a helpful description of the location in the GraphQL Source document. | ||
*/ | ||
export function printSourceLocation( | ||
source: Source, | ||
sourceLocation: SourceLocation, | ||
): string; |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* An exported enum describing the different kinds of tokens that the | ||
* lexer emits. | ||
*/ | ||
export const TokenKind: _TokenKind; | ||
|
||
type _TokenKind = { | ||
SOF: '<SOF>'; | ||
EOF: '<EOF>'; | ||
BANG: '!'; | ||
DOLLAR: '$'; | ||
AMP: '&'; | ||
PAREN_L: '('; | ||
PAREN_R: ')'; | ||
SPREAD: '...'; | ||
COLON: ':'; | ||
EQUALS: '='; | ||
AT: '@'; | ||
BRACKET_L: '['; | ||
BRACKET_R: ']'; | ||
BRACE_L: '{'; | ||
PIPE: '|'; | ||
BRACE_R: '}'; | ||
NAME: 'Name'; | ||
INT: 'Int'; | ||
FLOAT: 'Float'; | ||
STRING: 'String'; | ||
BLOCK_STRING: 'BlockString'; | ||
COMMENT: 'Comment'; | ||
}; | ||
|
||
/** | ||
* The enum type representing the token kinds values. | ||
*/ | ||
export type TokenKindEnum = _TokenKind[keyof _TokenKind]; |
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