Jobbuddy
Chargement...
Recherche...
Aucune correspondance
Référence de la classe TokenStream

Fonctions membres publiques

 __construct (private array $tokens, private ?Source $source=null,)
 __toString ()
 injectTokens (array $tokens)
 next ()
 nextIf ($primary, $secondary=null)
 expect ($type, $value=null, ?string $message=null)
 look (int $number=1)
 test ($primary, $secondary=null)
 isEOF ()
 getCurrent ()
 getSourceContext ()

Description détaillée

Represents a token stream.

Auteur
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Documentation des fonctions membres

◆ expect()

expect ( $type,
$value = null,
?string $message = null )

Tests a token and returns it or throws a syntax error.

◆ injectTokens()

injectTokens ( array $tokens)
Renvoie
void

◆ isEOF()

isEOF ( )

Checks if end of stream was reached.

◆ look()

look ( int $number = 1)

Looks at the next token.

◆ next()

next ( )

Sets the pointer to the next token and returns the old one.

◆ nextIf()

nextIf ( $primary,
$secondary = null )

Tests a token, sets the pointer to the next one and returns it or throws a syntax error.

Renvoie
Token|null The next token if the condition is true, null otherwise

◆ test()

test ( $primary,
$secondary = null )

Tests the current token.


La documentation de cette classe a été générée à partir du fichier suivant :