163 Commits

Author SHA1 Message Date
jos
7fefa33d84 Fixed #1077: Serialization/deserialization to JSON with reviver not being supported by nodes 2018-04-04 22:09:43 +02:00
jos
a11dfa9bcc Merge branch 'v4' into v4_binary_operator_node 2018-01-31 14:23:34 +01:00
jos
8f25ee7df0 Updated unit test in ConstantNode 2018-01-31 11:32:00 +01:00
jos
ece963bcdd Merge branch 'develop' into v4
# Conflicts:
#	lib/expression/node/ConstantNode.js
2018-01-31 11:28:14 +01:00
jos
82b41e696a - Implemented OperatorNode.isUnary and OperatorNode.isBinary.
- Explicit checks for number of arguments everywhere working with `OperatorNode` and `FunctionNode`.
- Fixed #1014: derivative silently ignoring additional arguments.
2018-01-31 11:00:39 +01:00
Max Bruckner
9126130794 toTex: Escape special characters in strings 2018-01-31 02:54:24 +01:00
jos
0b6c0c13f7 Merge branch 'v4' into v4_constant_node
# Conflicts:
#	HISTORY.md
2018-01-27 16:58:17 +01:00
jos
5efbb25da8 Merge branch 'develop' into v4
# Conflicts:
#	HISTORY.md
2018-01-27 16:57:24 +01:00
Harry Sarson
332ecf3d5d
adds failing test when implicit product is mapped 2018-01-27 14:21:36 +00:00
jos
4fcc9d231a Added a few more unit tests for ConstantNode 2018-01-25 20:29:43 +01:00
Max Bruckner
4a7e956242 ConstantNode: Add Fraction specific latex output. 2018-01-25 20:14:06 +01:00
jos
924299c42b Changed ConstantNode(valueStr, valueType) to ConstantNode(value) (breaking change) 2018-01-23 12:08:29 +01:00
jos
1192bb6bbc Implemented compile without eval (see #1019) 2018-01-21 18:13:27 +01:00
Max Bruckner
b2857392bd OperatorNode: Fix implicit multiplication
Fixes implicit multiplication when parenthesis is 'auto' and operands
are ConstantNodes.

This is handled by detecting that case and printing parentheses for
ParenthesisNodes even though they normally wouldn't with parenthesis
set to 'auto'.
2017-08-13 20:57:41 +02: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
a18f2068f3 Fixed toString of a parsed expression tree containing an immediately invoked function assignment not being wrapped in parenthesis 2017-08-12 11:03:19 +02:00
jos
27660d8c00 Some more security measures 2017-05-05 21:08:23 +02:00
jos
19faeac16c Escape function names and properties 2017-04-24 21:36:00 +02:00
jos
c259c936ec Refactored compile into a factory function 2017-04-22 17:12:38 +02:00
jos
a7bd4cd833 Register _compile as separate functions 2017-04-22 16:49:22 +02:00
jos
ee6efa3768 Only allow accessing/assigning properties on plain objects. Only allow calling known methods. 2017-04-08 15:32:10 +02:00
jos
f8370bdaf1 Fixed #790: Expression parser did not pass function arguments of enclosing functions via scope to functions having rawArgs = true 2017-02-05 13:50:06 +01:00
jos
79993ceac7 Fixed #765: FunctionAssignmentNode.toString() returning a string incompatible with the function assignment syntax 2016-12-18 13:29:21 +01:00
jos
e0123c7355 Implemented a method cloneDeep for the expression Nodes. See #745. 2016-11-18 15:37:07 +01:00
Max Bruckner
493bd7f6b0 OperatorNode: Support more than two operands in toTex/String
Only for multiplication and addition though.
2016-11-13 15:50:32 +07:00
Max Bruckner
ed86eedf32 test cloning of implicit multiplication 2016-11-11 13:20:57 +07:00
jos
4306200c4c Implemented method Node.equals(other) for all nodes of the expression parser 2016-11-05 16:27:23 +01:00
jos
730a10749e FunctionAssignmentNode creates a TypedFunction 2016-05-22 14:25:48 +02:00
jos
5edecb56c8 Removed the check on the number of arguments from functions defined in the expression parser (see #665) 2016-05-18 21:08:40 +02:00
jos
26e1e26555 Fixed #635: Node.toString options where not passed to function arguments 2016-04-03 11:31:08 +02:00
Max Bruckner
c72071dfb7 OperatorNode: toTex support for implicit multiplication
Use the option `implicit` with the value `hide` to not show the
multiplication sign for implicit multiplication. This is the default.
Use `show` otherwise.
2016-03-19 19:09:14 +01:00
Max Bruckner
65817dbf03 OperatorNode: toString support for implicit multiplication
Use the option `implicit` with the value `hide` to not show the
multiplication sign for implicit multiplication. This is the default.
Use `show` otherwise.
2016-03-19 18:48:54 +01:00
Max Bruckner
876740e123 fix: ParenthesisNode doesn't print parentheses with empty options
When the options to toString or toTex where an empty object,
ParenthesisNode didn't fall back to the default 'keep' behavior.
2016-03-19 18:38:58 +01:00
jos
15aca5e4d0 Changed casing of the values of config options number and matrix to match the actual name of the classes. 2016-03-04 19:41:54 +01:00
jos
f4b794100e Replaced tabs with spaces 2016-03-03 20:29:08 +01:00
jos
a60a70e6b9 Store dot notation in IndexNode 2016-02-27 11:36:47 +01:00
jos
89e1238fed Implemented read-only name-properties for AccessorNode and AssignmentNode, improved the name property of FunctionNode 2016-02-27 11:17:34 +01:00
jos
2869c37af9 Renamed Index.ranges to Index.dimensions 2016-02-26 20:51:09 +01:00
jos
0d6e7521d3 More unit tests 2016-02-26 20:15:52 +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
b7bd078def Added name property to UpdateNode 2016-01-08 22:27:19 +01:00
jos
1a1461cf89 Assignments in the expression parser now return the assigned value rather than the created or updated object (see #533) 2016-01-08 21:47:09 +01:00
jos
15b640fcea Merge branch 'develop' into feature/objectsupport
Conflicts:
	HISTORY.md
2016-01-08 20:33:22 +01:00
Max Bruckner
49e3fb7fad ConditionalNode: simplify LaTeX by using the 'cases' environment 2016-01-05 10:53:11 +01:00
Max Bruckner
a75abeb58e ObjectNode: prettier LaTeX output 2016-01-05 00:36:47 +01:00
jos
8d3d58e724 Implemented ObjectNode and object support in the expression parser 2016-01-02 23:00:14 +01:00
jos
476b75b33b Fixed a bug in the toString method of an IndexNode 2016-01-02 15:56:50 +01:00
Max Bruckner
1983516c2f Tests for new templates 2015-06-07 19:26:31 +02:00
Max Bruckner
a598204fa7 Change template Syntax to ES6 like style
Access properties via ${property} and ${property[index]}
2015-06-07 18:49:58 +02:00