40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
name: TokenStream
|
|
class_comment: '# * Represents a token stream.
|
|
|
|
# *
|
|
|
|
# * @author Fabien Potencier <fabien@symfony.com>'
|
|
dependencies: []
|
|
properties: []
|
|
methods:
|
|
- name: __toString
|
|
visibility: public
|
|
parameters: []
|
|
comment: "# * Represents a token stream.\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
|
|
# */\n# class TokenStream\n# {\n# public Token $current;\n# \n# private int $position\
|
|
\ = 0;\n# \n# public function __construct(\n# private array $tokens,\n# private\
|
|
\ string $expression = '',\n# ) {\n# $this->current = $tokens[0];\n# }\n# \n#\
|
|
\ /**\n# * Returns a string representation of the token stream."
|
|
- name: next
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Sets the pointer to the next token and returns the old one.'
|
|
- name: expect
|
|
visibility: public
|
|
parameters:
|
|
- name: type
|
|
- name: value
|
|
default: 'null'
|
|
- name: message
|
|
default: 'null'
|
|
comment: '# * @param string|null $message The syntax error message'
|
|
- name: isEOF
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Checks if end of stream was reached.'
|
|
- name: getExpression
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * @internal'
|
|
traits: []
|
|
interfaces: []
|