aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2019-01-10 21:47:27 +0300
committerGitHub <noreply@github.com>2019-01-10 21:47:27 +0300
commitba505031a329eaf632d1af646308482f9db57b68 (patch)
tree0011b15adaf299ecffb84d5806065c823dadb37b /src
parent0729b6b9bc0e3cebb868f889e88676b95c121a50 (diff)
Syncing to origin (#4)
* Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression
Diffstat (limited to 'src')
-rw-r--r--src/NXP/Classes/TokenFactory.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/NXP/Classes/TokenFactory.php b/src/NXP/Classes/TokenFactory.php
index 4ed55af..778cb59 100644
--- a/src/NXP/Classes/TokenFactory.php
+++ b/src/NXP/Classes/TokenFactory.php
@@ -88,8 +88,7 @@ class TokenFactory
throw new UnknownOperatorException($operatorClass);
}
- $this->operators[] = $operatorClass;
- $this->operators = array_unique($this->operators);
+ $this->operators[$operatorClass::getRegex()] = $operatorClass;
}
/**