blob: 41e4cbad835e1d38973a6b5f2e7ad802f97631ed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
namespace NXP\Classes;
class Token
{
public const Literal = 'literal';
public const Variable = 'variable';
public const Operator = 'operator';
public const LeftParenthesis = 'LP';
public const RightParenthesis = 'RP';
public const Function = 'function';
public const ParamSeparator = 'separator';
public const String = 'string';
public const Space = 'space';
public string $type = self::Literal;
public $value;
public ?string $name;
/**
* Token constructor.
*
*/
public function __construct(string $type, $value, ?string $name = null)
{
$this->type = $type;
$this->value = $value;
$this->name = $name;
}
}
|