PHP 클래스 PHP_CodeSniffer_Tokenizers_JS, PHP_CodeSniffer

파일 보기 프로젝트 열기: squizlabs/php_codesniffer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$endScopeTokens array This array is just a unique collection of the end tokens from the _scopeOpeners array. The data is duplicated here to save time during parsing of the file.
$scopeOpeners array This array also contains information about what kind of token the scope opener uses to open and close the scope, if the token strictly requires an opener, if the token can share a scope closer, and who it can be shared with. An example of a token that shares a scope closer is a CASE scope.
$skipMinified boolean If TRUE, files that appear to be minified will not be processed.

보호된 프로퍼티들

프로퍼티 타입 설명
$commentTokens array A list tokens that start and end comments.
$stringTokens array A list string delimiters.
$tokenValues array A list of special JS tokens and their types.

공개 메소드들

메소드 설명
getRegexToken ( string $char, string $string, string $chars, string $tokens, string $eolChar ) : void Tokenizes a regular expression if one is found.
processAdditional ( array &$tokens, string $eolChar ) : void Performs additional processing after main tokenizing.
tokenizeString ( string $string, string $eolChar = '\n' ) : array Creates an array of tokens when given some JS code.

메소드 상세

getRegexToken() 공개 메소드

If a regular expression is not found, NULL is returned.
public getRegexToken ( string $char, string $string, string $chars, string $tokens, string $eolChar ) : void
$char string The index of the possible regex start character.
$string string The complete content of the string being tokenized.
$chars string An array of characters being tokenized.
$tokens string The current array of tokens found in the string.
$eolChar string The EOL character to use for splitting strings.
리턴 void

processAdditional() 공개 메소드

This additional processing looks for properties, closures, labels and objects.
public processAdditional ( array &$tokens, string $eolChar ) : void
$tokens array The array of tokens to process.
$eolChar string The EOL character to use for splitting strings.
리턴 void

tokenizeString() 공개 메소드

Creates an array of tokens when given some JS code.
public tokenizeString ( string $string, string $eolChar = '\n' ) : array
$string string The string to tokenize.
$eolChar string The EOL character to use for splitting strings.
리턴 array

프로퍼티 상세

$commentTokens 보호되어 있는 프로퍼티

A list tokens that start and end comments.
protected array $commentTokens
리턴 array

$endScopeTokens 공개적으로 프로퍼티

This array is just a unique collection of the end tokens from the _scopeOpeners array. The data is duplicated here to save time during parsing of the file.
public array $endScopeTokens
리턴 array

$scopeOpeners 공개적으로 프로퍼티

This array also contains information about what kind of token the scope opener uses to open and close the scope, if the token strictly requires an opener, if the token can share a scope closer, and who it can be shared with. An example of a token that shares a scope closer is a CASE scope.
public array $scopeOpeners
리턴 array

$skipMinified 공개적으로 프로퍼티

If TRUE, files that appear to be minified will not be processed.
public bool $skipMinified
리턴 boolean

$stringTokens 보호되어 있는 프로퍼티

A list string delimiters.
protected array $stringTokens
리턴 array

$tokenValues 보호되어 있는 프로퍼티

A list of special JS tokens and their types.
protected array $tokenValues
리턴 array