aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Token/TokenMinus.php
Commit message (Collapse)AuthorAgeFilesLines
* WIP: New generation (#62)Alexander Kiryukhin2020-05-201-68/+0
| | | | | | | | | | | | | | * Massive refactoring More clean structure Parsing without regular expressions * Cleanup unused imports * Fix version string for Travis * 7.1 downgrade * Fix readme
* Left bracket and minus fix (#55)V1.1.2Clément Lafont2020-01-131-2/+6
| | | | | | * Left bracket and minus fix (#54) * Add test for left bracket and minus fix #55
* Logicandcompare (#50)franksl2019-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TokenFactory: allowing multicharacter tokens * Added logical and compare operators: <, <=, >, >=, ==, !=, ||, && * Fixed operator priorities * Error messages fixes * Fixed operators priority The priorities are assigned by following the php language standard (https://www.php.net/manual/en/language.operators.precedence.php) I've assigned precedence in steps of 10 units by following the linked page: 230 clone new 220 ** 210 ++ -- ~ (int) (float) (string) (array) (object) (bool) @ 200 instanceof 190 ! 180 * / % 170 + - . 160 << >> 150 < <= > >= 140 == != === !== <> <=> 130 & 120 ^ 110 | 100 && 90 || 80 ?? 70 ? : 60 = += -= *= **= /= .= %= &= |= ^= <<= >>= 50 yield from 40 yield 30 and 20 xor 10 or * Added if() function * Cache key fix There are cases where the cache key creation raised an error, for example while evaluating the expression "if(cos(2), cos(2), 0)", because the if() function was passing a float to the MathExecutor:execute() method.
* Fix single quotes parsing (#41)Alexander Kiryukhin2019-01-111-1/+1
| | | | | | | | | | * Fix single quotes parsing Fix e-mails Some small fixes * Mistake in test * More PHP versions
* Support for better invalid expression detection and divide by zero (#30)Bruce Wells2018-10-251-0/+10
| | | | | | | | * Additional validation for bad expressions (*+ for example) * Removing DivisionByZeroException testing for now Added more unit tests.
* Mass refactoringNeonXP2013-09-061-0/+54
Some changes: + Added support of functions with multiple arguments + Added some default function (min, max, avg). just example of multiple arguments :) - Removed variables support (I think they pointless) ~ All tokens now in individual classes ~ Parsing based on regular expressions ~ Fix negative numbers ~ Fix grouping with brackets