PHP 클래스 GraphQL\Language\Lexer

파일 보기 프로젝트 열기: webonyx/graphql-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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