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
Max Bruckner
b3e8aae10c
LaTeX templates for attached toTex properties
2015-06-07 18:47:50 +02:00
Max Bruckner
2b11b14632
Enable attaching toTex callbacks to functions
2015-06-07 18:41:25 +02:00
jos
a92b978036
Merged develop into v2
2015-06-07 15:57:41 +02:00
jos
c810981238
Method Node.compile() no longer needs math to be passed as argument.
2015-05-27 13:30:35 +02:00
Max Bruckner
3f217cefdd
toTex: no global configuration. Only pass around one local object
2015-05-16 13:30:25 +02:00
Max Bruckner
c0e1b2d268
toString: no global configuration. Only pass around one local object
2015-05-16 13:29:55 +02:00
Max Bruckner
8d3b3bbe35
Tests for custom toString
2015-05-16 13:29:20 +02:00
Max Bruckner
291d620972
Pass local configuration to toTex functions
2015-05-16 13:27:48 +02:00
Max Bruckner
e383c1c2ce
Throw errors when trying to toTex/toString a Node interface
2015-05-16 13:21:39 +02:00
Max Bruckner
aa7ca9178f
Implement 'all' parenthesis option
2015-05-08 09:07:15 +02:00
Max Bruckner
c6f22e3663
unskip tests that were broken by parsing parenthesis nodes
2015-05-07 12:06:37 +02:00
Max Bruckner
5767f1f912
OperatorNode: Fix bug from wrong use of getIdentifier
...
1+(1+1) with parenthesis set to 'auto' triggered a bug because
getPrecedence gets the precedence of the content of a node, but
getIdentifier still returns the 'ParenthesisNode' identifier in case of
a ParenthesisNode.
2015-05-07 12:04:53 +02:00
Max Bruckner
60e2b5700a
ParenthesisNode: Make use of the parenthesis config option
2015-05-07 10:13:41 +02:00