diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-05-20 06:04:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 06:04:31 +0300 |
commit | 949334d6c37d384800c639ba9941e94f5157f5ac (patch) | |
tree | ecfbcc7e3033ef1f11c25baca1c9d32f496d8ee1 /src/NXP/Classes/Token.php | |
parent | 01415abc9d7f7401d9f4c09fbbec24930c65a097 (diff) |
WIP: New generation (#62)
* Massive refactoring
More clean structure
Parsing without regular expressions
* Cleanup unused imports
* Fix version string for Travis
* 7.1 downgrade
* Fix readme
Diffstat (limited to 'src/NXP/Classes/Token.php')
-rw-r--r-- | src/NXP/Classes/Token.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/NXP/Classes/Token.php b/src/NXP/Classes/Token.php new file mode 100644 index 0000000..49bf741 --- /dev/null +++ b/src/NXP/Classes/Token.php @@ -0,0 +1,35 @@ +<?php + + +namespace NXP\Classes; + +class Token +{ + const Literal = "literal"; + const Variable = "variable"; + const Operator = "operator"; + const LeftParenthesis = "LP"; + const RightParenthesis = "RP"; + const Function = "function"; + const ParamSeparator = "separator"; + const String = "string"; + const Space = "space"; + + public $type = self::Literal; + + /** + * @var float|string + */ + public $value; + + /** + * Token constructor. + * @param string $type + * @param float|string $value + */ + public function __construct(string $type, $value) + { + $this->type = $type; + $this->value = $value; + } +} |