"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SymbolSet = void 0;
/**
 * @internal
 */
class SymbolSet {
    constructor() {
        this.symbolSetCollection = new Set();
    }
    /**
     * @internal
     */
    add(newSymbol) {
        this.symbolSetCollection.add(newSymbol);
    }
    /**
     * @internal
     */
    merge(symSet) {
        // let bodyCode = () =>
        {
            if (symSet !== undefined) {
                for (const sym of symSet) {
                    this.symbolSetCollection.add(sym);
                }
            }
        }
        // return p.measure(bodyCode);
    }
    /**
     * @internal
     */
    copy() {
        const newSet = new SymbolSet();
        for (const sym of this.symbolSetCollection) {
            newSet.add(sym);
        }
        return newSet;
    }
    /**
     * @internal
     */
    get size() {
        return this.symbolSetCollection.size;
    }
    // use Set iterator
    [Symbol.iterator]() {
        return this.symbolSetCollection[Symbol.iterator]();
    }
}
exports.SymbolSet = SymbolSet;
//# sourceMappingURL=symbolSet.js.map