This package contains interfaces representing scopes.

A scope is a container for definitions. See the `org.apache.royale.compiler.definition` package for more information about definitions. A can loosely be thought of as representing either an entire file (for a file scope) or a block of code delimited by curly braces (for a package scope, class scope, interface scope, function/getter/setter scope, catch scope, or with scope). Curly braces within some statements, such as those of a `for` loop, do not produce produce scopes, due to the "hoisting" rules of ActionScript.

In addition to being contained in a scope, some definitions contain an inner scope. Therefore a file scope is the root of a hierarchical data structure containing scopes and definitions. (Think of it as the symbol table for the file.) Definitions which are visible to other files are copied into a project scope for cross-file name resolution.

ActionScript's name resolution algorithm resolves an identifier in a scope to the definition to which it refers. That definition might be in the same scope, an enclosing scope, in the scope of a superclass, or in the project scope.

After being produced, scopes and definitions that are visible to other files are always resident in memory, so that the other files can perform name resolution. (In fact, they persist even after all other files have performed named resolution, in order to support subsequent incremental compilation.) Scopes and definitions that are internal to a particular file need to exist only when the AST for that file is in memory.