PHP Класс GraphQL\Language\Lexer

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__construct ( Source $source, array $options = [] )
advance ( ) : Token
nextToken ( ) : Token

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

advance() публичный Метод

public advance ( ) : Token
Результат Token

nextToken() публичный Метод

public nextToken ( ) : Token
Результат Token

Описание свойств

$lastToken публичное свойство

The previously focused non-ignored token.
public Token,GraphQL\Language $lastToken
Результат Token

$line публичное свойство

The (1-indexed) line containing the current token.
public int $line
Результат integer

$lineStart публичное свойство

The character offset at which the current line begins.
public int $lineStart
Результат integer

$options публичное свойство

public array $options
Результат array

$source публичное свойство

public Source,GraphQL\Language $source
Результат Source

$token публичное свойство

The currently focused non-ignored token.
public Token,GraphQL\Language $token
Результат Token