"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoBeTestOperatorProgrammer = void 0;
const typescript_1 = __importDefault(require("typescript"));
const writeTestExpression_1 = require("./writeTestExpression");
var AutoBeTestOperatorProgrammer;
(function (AutoBeTestOperatorProgrammer) {
    AutoBeTestOperatorProgrammer.conditionalExpression = (ctx, expr) => typescript_1.default.factory.createConditionalExpression((0, writeTestExpression_1.writeTestExpression)(ctx, expr.condition), undefined, (0, writeTestExpression_1.writeTestExpression)(ctx, expr.whenTrue), undefined, (0, writeTestExpression_1.writeTestExpression)(ctx, expr.whenFalse));
    AutoBeTestOperatorProgrammer.typeOfExpression = (ctx, expr) => typescript_1.default.factory.createTypeOfExpression((0, writeTestExpression_1.writeTestExpression)(ctx, expr.expression));
    AutoBeTestOperatorProgrammer.prefixUnaryExpression = (ctx, expr) => typescript_1.default.factory.createPrefixUnaryExpression(PREFIX_UNARY_OPERATORS[expr.operator], (0, writeTestExpression_1.writeTestExpression)(ctx, expr.operand));
    AutoBeTestOperatorProgrammer.postfixUnaryExpression = (ctx, expr) => typescript_1.default.factory.createPostfixUnaryExpression((0, writeTestExpression_1.writeTestExpression)(ctx, expr.operand), POSTFIX_UNARY_OPERATORS[expr.operator]);
    AutoBeTestOperatorProgrammer.binaryExpression = (ctx, expr) => typescript_1.default.factory.createBinaryExpression((0, writeTestExpression_1.writeTestExpression)(ctx, expr.left), BINARY_OPERATORS[expr.operator], (0, writeTestExpression_1.writeTestExpression)(ctx, expr.right));
})(AutoBeTestOperatorProgrammer || (exports.AutoBeTestOperatorProgrammer = AutoBeTestOperatorProgrammer = {}));
const POSTFIX_UNARY_OPERATORS = {
    "++": typescript_1.default.SyntaxKind.PlusPlusToken,
    "--": typescript_1.default.SyntaxKind.MinusMinusToken,
};
const PREFIX_UNARY_OPERATORS = Object.assign(Object.assign({}, POSTFIX_UNARY_OPERATORS), { "+": typescript_1.default.SyntaxKind.PlusToken, "-": typescript_1.default.SyntaxKind.MinusToken, "!": typescript_1.default.SyntaxKind.ExclamationToken });
const BINARY_OPERATORS = {
    "===": typescript_1.default.SyntaxKind.EqualsEqualsEqualsToken,
    "!==": typescript_1.default.SyntaxKind.ExclamationEqualsEqualsToken,
    "<": typescript_1.default.SyntaxKind.LessThanToken,
    "<=": typescript_1.default.SyntaxKind.LessThanEqualsToken,
    ">": typescript_1.default.SyntaxKind.GreaterThanToken,
    ">=": typescript_1.default.SyntaxKind.GreaterThanEqualsToken,
    "+": typescript_1.default.SyntaxKind.PlusToken,
    "-": typescript_1.default.SyntaxKind.MinusToken,
    "*": typescript_1.default.SyntaxKind.AsteriskToken,
    "/": typescript_1.default.SyntaxKind.SlashToken,
    "%": typescript_1.default.SyntaxKind.PercentToken,
    "&&": typescript_1.default.SyntaxKind.AmpersandAmpersandToken,
    "||": typescript_1.default.SyntaxKind.BarBarToken,
    instanceof: typescript_1.default.SyntaxKind.InstanceOfKeyword,
};
//# sourceMappingURL=AutoBeTestOperatorProgrammer.js.map