Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class LogicOr extends AbstractLogicExpression {
- protected rightAssociative = false;
- protected _precedence = 1;
- protected _expressionType = "+";
- phraseToString(): string {
- let result: string = "(";
- for(let expression of this.logicChildExpressions) {
- result += expression.phraseToString() + "+";
- }
- result = result.substring(0, result.length - 1);
- result += ")";
- return result;
- }
- public toString(): string {
- return "+";
- }
- public getResult(): boolean {
- let result: boolean = true;
- for(let expression of this.logicChildExpressions) {
- result = result || expression.getResult();
- }
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement