Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

where indentation indicates a parent-child relationship.

Q: What is a definition?

A: A definition is something that can be referred to by name. This includes packages, namespaces, classs, interfaces, functions (including getters and setters), parameters, variables, constants, events, styles, and effects.

Q: What is a scope?

A: A scope is where definitions live. Think of a scope as either a curly-brace block in a file, or the entire file.

Q: What is name resolution?

A: Name resolution determines which definition an identifier refers to (or "resolves to", or "binds to"). For example, in the code

No Format

private function f(i:int):void
{
    var j:int = 1;
    trace(i, j);
}

the identifier i that is the first argument of the trace call resolves to the definition of a parameter named i while the identifier j that is the second argument of the call resolves to the definition of a local variable named j.

Q: What is a code generator?

A: A code generator turns an abstract syntax tree into bytecode.

...