Here my problem:
I get this error:
Uncaught TypeError: Object prototype may only be an Object or null: undefined
export abstract class AbstractLogicExpression {
protected _logicChildExpressions: AbstractLogicExpression[] = Array();
protected _precedence = 0;
protected _parsed = false;
protected _expressionType = ;
protected rightAssociative = false;
public toDNF() {
for (let i = 0; i < this.logicChildExpressions.length; i++) {
let actualLogicExpression: AbstractLogicExpression = this.logicChildExpressions[i];
if (actualLogicExpression._expressionType == ~) {
let logicConjunction = actualLogicExpression.logicChildExpressions[0];
let var1 = logicConjunction.logicChildExpressions[0];
let var2 = logicConjunction.logicChildExpressions[1];
if (logicConjunction._expressionType == *) {
actualLogicExpression.logicChildExpressions[0] = new LogicOr();
//actualLogicExpression.logicChildExpressions[0].add(new LogicNeg(var1));
//actualLogicExpression.logicChildExpressions[0].add(new LogicNeg(var2));
}
}
}
}
}
I get this error because of the line before the two commented lines:
actualLogicExpression.logicChildExpressions[0] = new LogicOr();
I tested it by comment and uncomment the lines, because I get no line number in the error message.
Does someone know what I can do?
If you need a little more code. I can post something...
Here the code of LogicOr:
https://pastebin.com/T28Zjbtb