Token
Table of Contents
Constants
- T_BACK_QUOTE = 5
- T_CHAR = 2
- T_COMMENT = 7
- T_DOUBLE_QUOTE = 4
- T_SINGLE_QUOTE = 3
- T_SQUARE_QUOTE = 6
- T_STRING = 1
- T_WHITESPACE = 0
Properties
Methods
- __construct() : mixed
- appendText() : void
- Adds new text for the token.
- setText() : void
- Sets new text for the token.
Constants
T_BACK_QUOTE
public
mixed
T_BACK_QUOTE
= 5
T_CHAR
public
mixed
T_CHAR
= 2
T_COMMENT
public
mixed
T_COMMENT
= 7
T_DOUBLE_QUOTE
public
mixed
T_DOUBLE_QUOTE
= 4
T_SINGLE_QUOTE
public
mixed
T_SINGLE_QUOTE
= 3
T_SQUARE_QUOTE
public
mixed
T_SQUARE_QUOTE
= 6
T_STRING
public
mixed
T_STRING
= 1
T_WHITESPACE
public
mixed
T_WHITESPACE
= 0
Properties
$level
public
mixed
$level
$line
public
mixed
$line
$text
public
mixed
$text
$type
public
mixed
$type
$upper
public
mixed
$upper
Methods
__construct()
public
__construct(int $type, string $text) : mixed
Parameters
- $type : int
-
Type of the token.
- $text : string
-
Text of the token.
appendText()
Adds new text for the token.
public
appendText(string $text) : void
And updates member $upper properly.
Parameters
- $text : string
-
A chunk to be added.
setText()
Sets new text for the token.
public
setText(string $text) : void
And updates member $upper properly.
Parameters
- $text : string
-
New text.