ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_TokenParser_Do Class Reference

Evaluates an expression, discarding the returned value. More...

+ Inheritance diagram for Twig_TokenParser_Do:
+ Collaboration diagram for Twig_TokenParser_Do:

Public Member Functions

 parse (Twig_Token $token)
 Parses a token and returns a node. More...
 
 getTag ()
 Gets the tag name associated with this token parser. More...
 
- Public Member Functions inherited from Twig_TokenParser
 setParser (Twig_Parser $parser)
 Sets the parser associated with this token parser. More...
 

Additional Inherited Members

- Protected Attributes inherited from Twig_TokenParser
 $parser
 

Detailed Description

Evaluates an expression, discarding the returned value.

Definition at line 17 of file Do.php.

Member Function Documentation

◆ getTag()

Twig_TokenParser_Do::getTag ( )

Gets the tag name associated with this token parser.

Returns
string The tag name

Implements Twig_TokenParserInterface.

Definition at line 28 of file Do.php.

Referenced by parse().

29  {
30  return 'do';
31  }
+ Here is the caller graph for this function:

◆ parse()

Twig_TokenParser_Do::parse ( Twig_Token  $token)

Parses a token and returns a node.

Returns
Twig_NodeInterface
Exceptions
Twig_Error_Syntax

Implements Twig_TokenParserInterface.

Definition at line 19 of file Do.php.

References Twig_Token\BLOCK_END_TYPE, Twig_Token\getLine(), and getTag().

20  {
21  $expr = $this->parser->getExpressionParser()->parseExpression();
22 
23  $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
24 
25  return new Twig_Node_Do($expr, $token->getLine(), $this->getTag());
26  }
getTag()
Gets the tag name associated with this token parser.
Definition: Do.php:28
Represents a do node.
Definition: Do.php:17
getLine()
Definition: Token.php:87
const BLOCK_END_TYPE
Definition: Token.php:30
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: