Skip to content

Commit b7d35ec

Browse files
committed
1.0.1
1 parent b4c695a commit b7d35ec

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

dist/bundle.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(function (global, factory) {
2-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3-
typeof define === 'function' && define.amd ? define(factory) :
4-
(global.exprEval = factory());
2+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(global.exprEval = factory());
55
}(this, (function () { 'use strict';
66

77
/*!
@@ -972,31 +972,16 @@ TokenStream.prototype.parseError = function (msg) {
972972
throw new Error('parse error [' + (this.line + 1) + ':' + (this.column + 1) + ']: ' + msg);
973973
};
974974

975-
var unaryInstructionCache = {};
976975
function unaryInstruction(value) {
977-
var inst = unaryInstructionCache[value];
978-
if (!inst) {
979-
inst = unaryInstructionCache[value] = new Instruction(IOP1, value);
980-
}
981-
return inst;
976+
return new Instruction(IOP1, value);
982977
}
983978

984-
var binaryInstructionCache = {};
985979
function binaryInstruction(value) {
986-
var inst = binaryInstructionCache[value];
987-
if (!inst) {
988-
inst = binaryInstructionCache[value] = new Instruction(IOP2, value);
989-
}
990-
return inst;
980+
return new Instruction(IOP2, value);
991981
}
992982

993-
var ternaryInstructionCache = {};
994983
function ternaryInstruction(value) {
995-
var inst = ternaryInstructionCache[value];
996-
if (!inst) {
997-
inst = ternaryInstructionCache[value] = new Instruction(IOP3, value);
998-
}
999-
return inst;
984+
return new Instruction(IOP3, value);
1000985
}
1001986

1002987
function ParserState(parser, tokenStream) {

0 commit comments

Comments
 (0)