Versions Compared

Key

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

...

A: Name resolution determines which definition an identifier refers to (or "resolves to", or "binds to"). It's what the F2 key does in Flash Builder. For example, in the code

No Format
private function f(is:intString):void
{
    var ji:int = 1;
    traceg(is, ji);
}

the identifier i s that is the first argument of the trace g call resolves to the definition of a parameter named i s while the identifier j i that is the second argument of the call resolves to the definition of a local variable named j i. By resolving an identifier to a definition, the compiler can determine, among other things, the type of the identifier: for example, s is a String, and it can then check whether the definition of the g function accepts a String as its first argument.

Q: What is a code generator?

...