startScope(name) {
        const scopeInfo = {
            track: [],
            name: "unnamed scope",
            id: this.state.nextScopeId++
        };
        if (name) scopeInfo.name = name;
        this.state.scopeStack.push(scopeInfo);
        this.state.activeScope = scopeInfo;
    }
Start a scope. Use this with endScope() to achieve the same functionality
as scope() without the need for a function closure.