PHP Class GraphQL\Language\Lexer

Afficher le fichier Open project: webonyx/graphql-php Class Usage Examples

Méthodes publiques

Свойство Type Description
$lastToken Token The previously focused non-ignored token.
$line integer The (1-indexed) line containing the current token.
$lineStart integer The character offset at which the current line begins.
$options array
$source Source
$token Token The currently focused non-ignored token.

Méthodes publiques

Méthode Description
__construct ( Source $source, array $options = [] )
advance ( ) : Token
nextToken ( ) : Token

Private Methods

Méthode Description
assertValidStringCharacterCode ( $code, $position )
positionAfterWhitespace ( $startPosition ) : integer Reads from body starting at startPosition until it finds a non-whitespace or commented character, then returns the position of that character for lexing.
readComment ( $start, $line, $col, Token $prev ) : Token Reads a comment token from the source file.
readDigits ( $start, $firstCode ) Returns the new position in the source after reading digits.
readName ( integer $position, integer $line, integer $col, Token $prev ) : Token Reads an alphanumeric + underscore name from the source.
readNumber ( integer $start, string $firstCode, integer $line, integer $col, Token $prev ) : Token Reads a number token from the source file, either a float or an int depending on whether a decimal point appears.
readString ( integer $start, integer $line, integer $col, Token $prev ) : Token
readToken ( Token $prev ) : Token

Method Details

__construct() public méthode

public __construct ( Source $source, array $options = [] )
$source Source
$options array

advance() public méthode

public advance ( ) : Token
Résultat Token

nextToken() public méthode

public nextToken ( ) : Token
Résultat Token

Property Details

$lastToken public_oe property

The previously focused non-ignored token.
public Token,GraphQL\Language $lastToken
Résultat Token

$line public_oe property

The (1-indexed) line containing the current token.
public int $line
Résultat integer

$lineStart public_oe property

The character offset at which the current line begins.
public int $lineStart
Résultat integer

$options public_oe property

public array $options
Résultat array

$source public_oe property

public Source,GraphQL\Language $source
Résultat Source

$token public_oe property

The currently focused non-ignored token.
public Token,GraphQL\Language $token
Résultat Token