Travesal Through The Go Compiler, Part 4
noder.LoadPackage Parsing noder.LoadPackage will call syntax.Parse to generate the syntax tree of all package files. Initialize a compile/internal/syntax.scanner Advance scanner to the next token. Start parsing. Check the package declaration first, and take the package name from the parsed pragma. Note that the parser is expecting a ; token, but this is automatically generated at the scanner, so users don’t have to write the ;. And parsing errors will not always abort the parser loop....