"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const CoreTestUtil_1 = require("../testmodel/expressions/CoreTestUtil");
const testmodel_1 = require("../testmodel");
const CoreTestModel_1 = require("../testmodel/CoreTestModel");
CoreTestModel_1.CoreTestModelElement.prototype.piId = function () {
    return this.$id;
};
CoreTestModel_1.CoreTestModelElement.prototype.piIsExpression = function () {
    return false;
};
CoreTestModel_1.CoreTestModelElement.prototype.piContainer = function () {
    return this.container
        ? {
            container: this.container,
            propertyName: this.propertyName,
            propertyIndex: this.propertyIndex
        }
        : null;
};
CoreTestModel_1.CoreTestModelElement.prototype.piLanguageConcept = function () {
    return this.$typename;
};
testmodel_1.CoreTestExpression.prototype.piId = function () {
    return this.$id;
};
testmodel_1.CoreTestExpression.prototype.piContainer = function () {
    return this.container
        ? {
            container: this.container,
            propertyName: this.propertyName,
            propertyIndex: this.propertyIndex
        }
        : null;
};
testmodel_1.CoreTestExpression.prototype.piIsExpression = function () {
    return true;
};
testmodel_1.CoreTestExpression.prototype.piIsBinaryExpression = function () {
    return false;
};
const priorities = {
    or: 1,
    and: 3,
    "==": 5,
    "<": 5,
    "<=": 5,
    ">": 5,
    ">=": 5,
    "+": 10,
    "-": 10,
    "*": 20,
    "/": 20,
    "^": 30
};
testmodel_1.CoreTestBinaryExpression.prototype.piLeft = function () {
    return this.left;
};
testmodel_1.CoreTestBinaryExpression.prototype.piRight = function () {
    return this.right;
};
testmodel_1.CoreTestBinaryExpression.prototype.piSetLeft = function (value) {
    this.left = value;
};
testmodel_1.CoreTestBinaryExpression.prototype.piSetRight = function (value) {
    this.right = value;
};
testmodel_1.CoreTestBinaryExpression.prototype.piPriority = function () {
    return priorities[CoreTestUtil_1.symbol(this)];
};
testmodel_1.CoreTestBinaryExpression.prototype.piIsBinaryExpression = function () {
    return true;
};
//# sourceMappingURL=CoreTestExpression.js.map