Comparing version 1.2.4 to 1.2.5
@@ -5,2 +5,5 @@ # Release notes | ||
## 1.2.5 | ||
- Optimizations (resulting return as number) and code cleaning by hand in file 'parser.jison'. | ||
## 1.2.4 | ||
@@ -7,0 +10,0 @@ - The file 'symbol-table.ts' and 'symbol-table.spec.ts' has been created. |
@@ -101,4 +101,7 @@ # Contributing to MathJSLab | ||
operations for arrays with only real elements. | ||
* Parser is designed to scan a line. Need to code a parser that scan multiple | ||
lines calling Evaluator when need. | ||
* Integer types and bitwise operations and functions. | ||
* String type and their respective functions. | ||
* Parser is designed to scan a line (now support spaces and newlines | ||
inside block comments and arrays). Need to code a parser that scan | ||
multiple lines calling Evaluator when need. | ||
The real need is a parser that supports both modes: single-line and | ||
@@ -114,3 +117,5 @@ multi-line. | ||
[Typescript](https://www.typescriptlang.org/). This is the reason why | ||
MathJSLab is compiled as an ES5 module. | ||
MathJSLab is compiled as an ES5 module. At now we are developing a parser | ||
using ANTLR4 and version 1.2.5 is probably the last version of MathJSLab | ||
using Jison. | ||
@@ -117,0 +122,0 @@ You are welcome to contribute to this project. I will be very grateful if you |
@@ -144,2 +144,17 @@ /** | ||
} | ||
interface NodeIf extends PrimaryNode { | ||
type: 'IF'; | ||
expression: NodeExpr[]; | ||
then: NodeList[]; | ||
else: NodeList | null; | ||
} | ||
interface NodeElseIf extends PrimaryNode { | ||
type: 'ELSEIF'; | ||
expression: NodeExpr; | ||
then: NodeList; | ||
} | ||
interface NodeElse extends PrimaryNode { | ||
type: 'ELSE'; | ||
else: NodeList; | ||
} | ||
} | ||
@@ -262,2 +277,3 @@ /** | ||
readonly getDimension: typeof MultiArray.getDimension; | ||
readonly toLogical: typeof MultiArray.toLogical; | ||
/** | ||
@@ -390,2 +406,7 @@ * Special functions MathML unparser. | ||
reduceIfReturnList(tree: any): any; | ||
nodeIfBegin(expression: any, then: Evaluator.NodeList): Evaluator.NodeIf; | ||
nodeIfAppendElse(nodeIf: Evaluator.NodeIf, nodeElse: Evaluator.NodeElse): Evaluator.NodeIf; | ||
nodeIfAppendElseIf(nodeIf: Evaluator.NodeIf, nodeElseIf: Evaluator.NodeElseIf): Evaluator.NodeIf; | ||
nodeElseIf(expression: any, then: Evaluator.NodeList): Evaluator.NodeElseIf; | ||
nodeElse(elseStmt: Evaluator.NodeList): Evaluator.NodeElse; | ||
/** | ||
@@ -430,2 +451,8 @@ * Validate left side of assignment node. | ||
/** | ||
* | ||
* @param tree | ||
* @returns | ||
*/ | ||
toBoolean(tree: any): boolean; | ||
/** | ||
* Expression tree recursive evaluator. | ||
@@ -432,0 +459,0 @@ * @param tree Expression to evaluate. |
{ | ||
"name": "mathjslab", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "MathJSLab - An interpreter with language syntax like MATLAB®/Octave. ISBN 978-65-00-82338-7", | ||
@@ -60,8 +60,8 @@ "main": "lib/mathjslab.js", | ||
"@types/jest": "29.5.10", | ||
"@types/node": "^20.10.0", | ||
"@types/node": "^20.10.2", | ||
"@types/supertest": "^2.0.16", | ||
"@types/webpack": "^5.28.5", | ||
"@typescript-eslint/eslint-plugin": "^6.12.0", | ||
"eslint": "^8.54.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"eslint": "^8.55.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
@@ -68,0 +68,0 @@ "eslint-plugin-prettier": "^5.0.1", |
@@ -170,3 +170,3 @@ import { ComplexDecimal } from './complex-decimal'; | ||
public static sub2ind(DIMS: any, ...S: any) { | ||
if (arguments.length === 2) { | ||
if (arguments.length > 1) { | ||
const dims = MultiArray.linearize(DIMS).map((value) => value.re.toNumber()); | ||
@@ -173,0 +173,0 @@ const subscript: MultiArray[] = S.map((s: any) => MultiArray.scalarToMultiArray(s)); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
596415
8761