101 Commits

Author SHA1 Message Date
jos
99ab11b234 Dropped constant uninitialized 2018-02-04 13:09:09 +01:00
Jos de Jong
e631771df0
Merge branch 'v4' into v4_fn_implicit_multiplication 2018-02-04 11:58:15 +01:00
Jos de Jong
cdda817d9f
Merge pull request #1036 from ericman314/implicit-multiplication
Implicit multiplication
2018-02-04 11:55:15 +01:00
Eric Mansfield
83862d2996 Refactored token state history into own function 2018-02-03 14:19:48 -07:00
jos
11b4c03460 Remove support for calling a function returned by a function, parse as implicit multiplication instead. See #1035 2018-02-03 21:52:18 +01:00
Eric Mansfield
090f4c920f Added 'number/number (', and tests 2018-02-03 09:44:30 -07:00
Eric Mansfield
b50d4fe2f1 Adjusted "rule 2" to match "number / number symbol" 2018-02-03 08:16:46 -07:00
jos
3f3d50f7a0 Fixed #833: the constants true, false, null, undefined, NaN, Infinity, and uninitialized are now parsed as ConstantNodes instead of SymbolNodes in the expression parser 2018-01-23 13:55:57 +01:00
jos
924299c42b Changed ConstantNode(valueStr, valueType) to ConstantNode(value) (breaking change) 2018-01-23 12:08:29 +01:00
jos
ef607935bd Replaced == with === 2018-01-23 09:29:34 +01:00
jos
1192bb6bbc Implemented compile without eval (see #1019) 2018-01-21 18:13:27 +01:00
jos
8d2d48d81b Fixed a security issue in typed-function allowing arbitrary code execution 2017-11-18 19:39:30 +01:00
ericman314
fb9bf5eab1 Added parseFraction
Added parseFraction, which matches "integer / integer" and has higher
precedence than implicit multiplication
2017-10-21 15:58:20 -06:00
ericman314
1c7081abd8 Increased precedence of implicit multiplication
Moved the implicit part of parseMultiplyDivide into its own function
which has higher precedence.
2017-10-21 15:11:45 -06:00
jos
967e65cceb Refactored usage of properties .isNode, .isSymbolNode, etc. into using functions like type.isNode(x) for security 2017-08-12 14:38:03 +02:00
jos
469e6bf3cf Fixed #895: added support for the dollar character $ in symbol names 2017-07-10 20:29:30 +02:00
Harry Sarson
43ae05bbc5 remove " from end of error message 2017-06-29 23:55:44 +01:00
Harry Sarson
291b96d83e Syntax error includes hint if single quotes are used for a string 2017-06-29 23:49:16 +01:00
jos
85ac1a0aa4 Some more security measures 2017-05-05 20:53:20 +02:00
jos
c259c936ec Refactored compile into a factory function 2017-04-22 17:12:38 +02:00
jos
bd52740e61 Fixed #795: Parse error in case of a multi-line expression with just comments 2017-02-15 22:05:38 +01:00
jos
a5df5e4c47 Fixed #762: expression parser failing to invoke a function returned by a function 2016-12-10 11:41:38 +01:00
jos
7152142661 Fixed #732: Allow letter-like unicode characters like Ohm \u2126 2016-11-18 19:19:17 +01:00
jos
064eb31381 Fixed #715: Parser now exposes test functions like isAlpha which can be replaced in order to adjust the allowed characters in variables names 2016-10-21 16:33:38 +02:00
jos
80c55add2a Parser not throwing an error for invalid implicit multiplications like -2 2 and 2^3 4 2016-10-21 15:23:20 +02:00
jos
d6ce2cd332 Released v3.5.3 2016-09-21 21:25:36 +02:00
jos
7742b36c5c Some more fixes regarding numbers ending with a decimal mark (like 2.). See #711. 2016-09-20 21:35:19 +02:00
jos
9199ae58ae Fixed #711: parser accepts numbers ending with a decimal mark again like 2.. 2016-09-20 21:02:28 +02:00
jos
92918ed9b2 Fixed #707: The expression parser no longer accepts numbers ending with a dot like 2. 2016-09-07 21:10:20 +02:00
jos
23d1786cb2 Comments of expressions are are now stored in the parsed nodes, see #690 2016-08-23 21:12:39 +02:00
jos
cb4a1a98cb Fixed #641: Bug in expression parser parsing implicit multiplication with wrong precedence in specific cases 2016-04-16 09:43:24 +02:00
jos
508e39ca2c Only allow operator in to be parsed as unit 2016-04-03 14:09:46 +02:00
jos
5b682d6040 Fixed #625: Unit in (inch) not always working due to ambiguity with
the operator `a in b` (alias of `a to b`)
2016-04-03 14:06:43 +02:00
jos
8b39e1b336 Fixed #629: expression parser throws an error when passing a number with decimal exponent instead of parsing them as implicit multiplication 2016-04-03 12:46:58 +02:00
jos
924a8e480f Fixed #632: problem with escaped backslashes at the end of strings 2016-04-03 11:17:06 +02:00
jos
77736f554b Fixed #621: a bug in parsing implicit multiplications like (2)(3)+4 2016-03-22 20:23:07 +01:00
jos
784c0f2b1b Updated history, one update for implicit multiplication 2016-03-19 20:25:50 +01:00
jos
d9e7ced69c Merge remote-tracking branch 'origin/develop' into develop 2016-03-19 20:22:38 +01:00
jos
c8d41fc5b4 Restored support for implicit multiplications like (2+3)(4+5) 2016-03-19 20:16:54 +01:00
Max Bruckner
6f39ec5da9 OperatorNode: new 'implicit' attribute to mark implicit multiplication
This also modifies the parser to set this attribute
2016-03-19 14:25:58 +01:00
jos
1089cd4d2a Fixed #597: restored support for implicit multiplication like 2(3+4) 2016-03-12 13:30:47 +01:00
jos
1dd3a0e492 Expression parser now allows assignments inside objects, indexes, and function arguments 2016-03-03 19:25:42 +01:00
jos
a60a70e6b9 Store dot notation in IndexNode 2016-02-27 11:36:47 +01:00
jos
9173fbd3b8 Large refactoring of nodes: AssignmentNode. UpdateNode, AccessorNode, IndexNode 2016-02-25 15:02:44 +01:00
jos
fad5d8cc07 Merged parseFunctions and parseIndex into parseAccessors. Restricted support for implicit multiplication, execute as accessors instead 2016-01-09 21:11:29 +01:00
jos
5ee4b81c62 Implemented dot notation for object properties 2016-01-03 14:56:29 +01:00
jos
8d3d58e724 Implemented ObjectNode and object support in the expression parser 2016-01-02 23:00:14 +01:00
jos
d9f237d29b Added support in the expression parser for mathematical alphanumeric symbols (see #265) 2015-09-25 20:47:38 +02:00
jos
0dfc8d1d3e Fixed inconsistent parsing of implicit multiplication (see #322) 2015-09-13 21:40:14 +02:00
jos
efcd0cc1fe Fixed #463: inconsistent handling of implicit multiplication 2015-09-13 21:13:35 +02:00