39 Commits

Author SHA1 Message Date
Max Bruckner
35ce7f7fb4 Make Node.toTex a wrapper like Node.compile
Node.prototype.toTex is now a wrapper that calls the node's _toTex
2015-03-13 21:23:14 +01:00
Max Bruckner
d593e749e9 New function getIdentifier() for Nodes
getIdentifier() returns a String that contains the name of the node and
the function associated with it ( in case of FunctionNode and
OperatorNode ).
2015-03-01 10:35:03 +01:00
jos
86bcd55352 Changed the way transforms are registered internally, making Node.compile faster, and enabling lazy-loading constants 2015-01-13 10:48:52 +01:00
jos
309bf3938d Added proper error messages to Node.map 2014-11-15 13:32:02 +01:00
jos
9257ec3c33 Added unit tests for Node.map and Node.forEach 2014-11-15 13:16:32 +01:00
jos
5669ae1365 Some refactoring 2014-11-14 11:35:13 +01:00
jos
a1f60db0d1 Created Node.map, changed traverse to use Node.map 2014-11-14 11:25:48 +01:00
jos
20c96894ab Enforcing implementation of _traverse on Nodes 2014-11-13 22:16:57 +01:00
jos
be9a8629ea Node.transform does not create a clone of the tree anymore 2014-11-13 22:01:48 +01:00
jos
423909e6f1 Changed constructor of RangeNode to new RangeNode(start: Node, end: Node [, step: Node]). 2014-11-13 21:25:37 +01:00
jos
bd1981ecd0 Renamed Node.map and Node.forEach back to traverse and transform 2014-10-13 21:42:48 +02:00
jos
adf0b39a69 Fixed deprecated messages 2014-10-12 19:45:05 +02:00
jos
b4de2cb549 Some code reorganization 2014-10-12 19:37:02 +02:00
jos
238281e28a Renamed traverse and transform to forEach and map 2014-10-12 19:32:51 +02:00
jos
95a49fe156 Node.transform first clones the node tree 2014-10-11 21:59:47 +02:00
jos
839e596772 Implemented transform and traverse 2014-10-11 18:03:41 +02:00
jos
5f08307391 Implemented a function replace for nodes of a parsed expression. 2014-10-11 15:33:23 +02:00
jos
f23c87c4f7 renamed __transform__ to transform 2014-08-16 17:41:37 +02:00
jos
99fc9a0ead Implemented support for raw functions 2014-08-16 12:13:57 +02:00
jos
8200955d71 Removed unnecessary names of functions 2014-07-21 22:14:27 +02:00
jos
8c224d3e71 Moved transformation of error messages (zero-based to one-based) to the expression/transform section 2014-07-20 20:45:10 +02:00
jos
21b34cfa1a Implemented transforms, moved all one-based to zero-based logic for expressions to transforms. 2014-07-19 21:47:15 +02:00
jos
40986a1325 Using strict mode now in all files (added 'use strict'; on top of every file) 2014-07-18 23:19:14 +02:00
jos
7d84e4daf0 Math.js now immediately returns a default instance of mathjs, no need to create an instance every time you want to use the library. 2014-06-20 23:11:14 +02:00
jos
9f346f19bc Changed signature of math.parse(expr, nodes) to math.parse(expr, options) 2014-06-10 21:35:06 +02:00
jos
2fe9f0d736 Fixed #151: end is now a reserved keyword 2014-06-10 21:13:27 +02:00
Niels Heisterkamp
b7fe0bfbf1 Added LaTeX conversion of expressions using toTex() on expression.
Also added some basic tests, which cover some use cases; but should be expanded.
2014-05-19 08:20:06 +02:00
jos
ae42bdd9a5 Fixed an implicit require path to an index file 2014-05-07 21:15:43 +02:00
jos
1189efd4d8 Added property type to all expression nodes in a node tree. 2014-04-24 20:26:51 +02:00
josdejong
97cbb0093f Moved errors to their own namespace and folder 2014-04-11 18:02:29 +02:00
josdejong
d0fb727c43 Implemented DimensionError and IndexError 2014-04-06 20:53:23 +02:00
josdejong
b046c7ee98 Completed unit tests for all expression nodes 2014-03-01 15:55:20 +01:00
josdejong
bc157eb400 Updated docs and examples 2014-01-07 21:44:00 +01:00
josdejong
00e55b917e Replaced eval with compile 2014-01-07 16:12:57 +01:00
josdejong
a0f1053697 Simplified compilation factory code 2014-01-05 20:26:05 +01:00
josdejong
5f81246136 Implemented global definitions internally in expression compilation 2014-01-05 15:01:07 +01:00
josdejong
d7349296c0 Implemented IndexNode 2014-01-04 17:53:02 +01:00
josdejong
f6acb12e4d Implemented expression compilation for 80% 2014-01-01 20:46:30 +01:00
josdejong
eadb884af9 Moved around code and namespaces in order to separate expression parser related code. 2013-08-31 09:37:14 +02:00