function evaluatePostfixUnaryExpression({ node, evaluate, environment, reporting, typescript, statementTraversalStack }) {
    var _a, _b;
    // Make sure to evaluate the operand to ensure that it is found in the lexical environment
    evaluate.expression(node.operand, environment, statementTraversalStack);
    switch (node.operator) {
        case typescript.SyntaxKind.PlusPlusToken: {
            // If the Operand isn't an identifier, this will be a SyntaxError
            if (!typescript.isIdentifier(node.operand) && !((_a = typescript.isPrivateIdentifier) === null || _a === void 0 ? void 0 : _a.call(typescript, node.operand))) {
                throw new UnexpectedNodeError({ node: node.operand, typescript });
            }
            // Find the value associated with the identifier within the environment.
            const value = getRelevantDictFromLexicalEnvironment(environment, node.operand.text)[node.operand.text]++;
            // Inform reporting hooks if any is given
            if (reporting.reportBindings != null) {
                reporting.reportBindings({ path: node.operand.text, value, node });
            }
            return value;
        }
        case typescript.SyntaxKind.MinusMinusToken: {
            // If the Operand isn't an identifier, this will be a SyntaxError
            if (!typescript.isIdentifier(node.operand) && !((_b = typescript.isPrivateIdentifier) === null || _b === void 0 ? void 0 : _b.call(typescript, node.operand))) {
                throw new UnexpectedNodeError({ node: node.operand, typescript });
            }
            // Find the value associated with the identifier within the environment.
            const value = getRelevantDictFromLexicalEnvironment(environment, node.operand.text)[node.operand.text]--;
            // Inform reporting hooks if any is given
            if (reporting.reportBindings != null) {
                reporting.reportBindings({ path: node.operand.text, value, node });
            }
            return value;
        }
    }
}
/**
 * Evaluates, or attempts to evaluate, a PostfixUnaryExpression
 */
Evaluates, or attempts to evaluate, a PostfixUnaryExpression
Evaluates or attempts to evaluate a PostfixUnaryExpression
function evaluatePostfixUnaryExpression({ node, evaluate, environment, reporting, typescript, statementTraversalStack }) {
    var _a, _b;
    evaluate.expression(node.operand, environment, statementTraversalStack);
    switch (node.operator) {
        case typescript.SyntaxKind.PlusPlusToken: {
            if (!typescript.isIdentifier(node.operand) && !((_a = typescript.isPrivateIdentifier) === null || _a === void 0 ? void 0 : _a.call(typescript, node.operand))) {
                throw new UnexpectedNodeError({ node: node.operand, typescript });
            }
            const value = getRelevantDictFromLexicalEnvironment(environment, node.operand.text)[node.operand.text]++;
            if (reporting.reportBindings != null) {
                reporting.reportBindings({ path: node.operand.text, value, node });
            }
            return value;
        }
        case typescript.SyntaxKind.MinusMinusToken: {
            if (!typescript.isIdentifier(node.operand) && !((_b = typescript.isPrivateIdentifier) === null || _b === void 0 ? void 0 : _b.call(typescript, node.operand))) {
                throw new UnexpectedNodeError({ node: node.operand, typescript });
            }
            const value = getRelevantDictFromLexicalEnvironment(environment, node.operand.text)[node.operand.text]--;
            if (reporting.reportBindings != null) {
                reporting.reportBindings({ path: node.operand.text, value, node });
            }
            return value;
        }
    }
}
function evaluatePostfixUnaryExpression ( { node , evaluate , environment , reporting , typescript , statementTraversalStack } ) { var _a , _b ; evaluate . expression ( node . operand , environment , statementTraversalStack ) ; switch ( node . operator ) { case typescript . SyntaxKind . PlusPlusToken : { if ( ! typescript . isIdentifier ( node . operand ) && ! ( ( _a = typescript . isPrivateIdentifier ) === null || _a === void 0 ? void 0 : _a . call ( typescript , node . operand ) ) ) { throw new UnexpectedNodeError ( { node : node . operand , typescript } ) ; } const value = getRelevantDictFromLexicalEnvironment ( environment , node . operand . text ) [ node . operand . text ] ++ ; if ( reporting . reportBindings != null ) { reporting . reportBindings ( { path : node . operand . text , value , node } ) ; } return value ; } case typescript . SyntaxKind . MinusMinusToken : { if ( ! typescript . isIdentifier ( node . operand ) && ! ( ( _b = typescript . isPrivateIdentifier ) === null || _b === void 0 ? void 0 : _b . call ( typescript , node . operand ) ) ) { throw new UnexpectedNodeError ( { node : node . operand , typescript } ) ; } const value = getRelevantDictFromLexicalEnvironment ( environment , node . operand . text ) [ node . operand . text ] -- ; if ( reporting . reportBindings != null ) { reporting . reportBindings ( { path : node . operand . text , value , node } ) ; } return value ; } } }
Evaluates, or attempts to evaluate, a PostfixUnaryExpression
Evaluates or attempts to evaluate a PostfixUnaryExpression
// Make sure to evaluate the operand to ensure that it is found in the lexical environment // If the Operand isn't an identifier, this will be a SyntaxError // Find the value associated with the identifier within the environment. // Inform reporting hooks if any is given // If the Operand isn't an identifier, this will be a SyntaxError // Find the value associated with the identifier within the environment. // Inform reporting hooks if any is given