Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class Lexeme { |
||
9 | |||
10 | public const T_INVALID = ''; |
||
11 | public const T_LITERAL_STRING = '!'; |
||
12 | |||
13 | protected string $lexItemType; |
||
14 | protected string $val; |
||
15 | protected int $pos; |
||
16 | |||
17 | /** |
||
18 | * LexItem constructor. |
||
19 | */ |
||
20 | 15 | public function __construct( string $lexItemType, string $val, int $pos ) { |
|
21 | 15 | $this->lexItemType = $lexItemType; |
|
22 | 15 | $this->val = $val; |
|
23 | 15 | $this->pos = $pos; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * The type of the printf Lexeme |
||
28 | */ |
||
29 | 15 | public function getLexItemType() : string { |
|
30 | 15 | return $this->lexItemType; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * The text of the lexeme |
||
35 | */ |
||
36 | 15 | public function getVal() : string { |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * The string position of the given lexeme |
||
42 | */ |
||
43 | 10 | public function getPos() : int { |
|
48 |