\Pvra\LexerExtendedEmulativeLexer

Summary

Methods
Properties
Constants
createDefaultInstance()
getNextToken()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

createDefaultInstance()

createDefaultInstance() : \Pvra\Lexer\ExtendedEmulativeLexer|static

Create a new Lexer instance with appropriate configuration options

Whenever a new lexer instance is created that is meant to be passed to a Pvra\Analyser or consumed by a Pvra\AnalyserAwareInterface this method should be used.

Returns

\Pvra\Lexer\ExtendedEmulativeLexer|static

getNextToken()

getNextToken(null|string  $value = null, null|array  $startAttributes = null, null|array  $endAttributes = null) : integer

Override to the native getNextToken method

This method override ensures that the original value of tokens that would be transformed is stored besides them in the result ast. Depending on the token type various attributes will be added to the token and produced ast. These modifications are required to ensure the correct behaviour of the binary number detection, the detection of booth flavors of the doc syntax, short array syntax and short echo tags.

Parameters

null|string $value
null|array $startAttributes
null|array $endAttributes

Returns

integer —

Retrieved token id