function evaluateEnumDeclaration({ node, environment, evaluate, statementTraversalStack, reporting, stack }) {
    // Create a new ObjectLiteral based on the Object implementation from the Realm since this must not be the same as in the parent executing context
    // Otherwise, instanceof checks would fail
    const objectCtor = getFromLexicalEnvironment(node, environment, "Object").literal;
    const enumDeclaration = objectCtor.create(objectCtor.prototype);
    const name = node.name.text;
    // Bind the Enum to the lexical environment as a new binding
    setInLexicalEnvironment({ env: environment, path: name, value: enumDeclaration, newBinding: true, reporting, node });
    for (const member of node.members) {
        evaluate.nodeWithArgument(member, environment, enumDeclaration, statementTraversalStack);
    }
    enumDeclaration.toString = () => `[Enum: ${name}]`;
    // Push the Enum declaration on to the Stack
    stack.push(enumDeclaration);
}
/**
 * Evaluates, or attempts to evaluate, an EnumDeclaration
 */
Evaluates, or attempts to evaluate, an EnumDeclaration
Evaluates or attempts to evaluate an EnumDeclaration
function evaluateEnumDeclaration({ node, environment, evaluate, statementTraversalStack, reporting, stack }) {
    const objectCtor = getFromLexicalEnvironment(node, environment, "Object").literal;
    const enumDeclaration = objectCtor.create(objectCtor.prototype);
    const name = node.name.text;
    setInLexicalEnvironment({ env: environment, path: name, value: enumDeclaration, newBinding: true, reporting, node });
    for (const member of node.members) {
        evaluate.nodeWithArgument(member, environment, enumDeclaration, statementTraversalStack);
    }
    enumDeclaration.toString = () => `[Enum: ${name}]`;
    stack.push(enumDeclaration);
}
function evaluateEnumDeclaration ( { node , environment , evaluate , statementTraversalStack , reporting , stack } ) { const objectCtor = getFromLexicalEnvironment ( node , environment , "Object" ) . literal ; const enumDeclaration = objectCtor . create ( objectCtor . prototype ) ; const name = node . name . text ; setInLexicalEnvironment ( { env : environment , path : name , value : enumDeclaration , newBinding : true , reporting , node } ) ; for ( const member of node . members ) { evaluate . nodeWithArgument ( member , environment , enumDeclaration , statementTraversalStack ) ; } enumDeclaration . toString = ( ) => ` ${ name } ` ; stack . push ( enumDeclaration ) ; }
Evaluates, or attempts to evaluate, an EnumDeclaration
Evaluates or attempts to evaluate an EnumDeclaration
// Create a new ObjectLiteral based on the Object implementation from the Realm since this must not be the same as in the parent executing context // Otherwise, instanceof checks would fail // Bind the Enum to the lexical environment as a new binding // Push the Enum declaration on to the Stack