enterScope

fun enterScope(nodeToScope: Node)

This function, in combination with leaveScope is the main interaction point with the scope manager for language frontends. Every time a language frontend handles a node that begins a new scope, this function needs to be called. Appropriate scopes will then be created on-the-fly, if they do not exist.

The scope manager has an internal association between the type of scope, e.g. a LocalScope and the CPG node it represents, e.g. a Block.

Afterward, all calls to addDeclaration will be distributed to the DeclarationHolder that is currently in-scope.