\Twig_TokenStream
Represents a token stream.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Twig_TokenStream
{
- // methods
- public void __construct()
- public string __toString()
- public void injectTokens()
- public Twig_Token next()
- public Twig_Token expect()
- public Twig_Token look()
- public bool test()
- public bool isEOF()
- public Twig_Token getCurrent()
- public string getFilename()
Members
protected
- $current
- $filename
- $tokens
Methods
public
- __construct() — Constructor.
- __toString() — Returns a string representation of the token stream.
- expect() — Tests a token and returns it or throws a syntax error.
- getCurrent() — Gets the current token
- getFilename() — Gets the filename associated with this stream
- injectTokens()
- isEOF() — Checks if end of stream was reached
- look() — Looks at the next token.
- next() — Sets the pointer to the next token and returns the old one.
- test() — Tests the current token