• Robert Griesemer's avatar
    go/ast, go/parser: populate identifier scopes at parse time · 021b040a
    Robert Griesemer authored
    The parser populates all scopes for a given file (except
    type-related scopes for structs, interfaces, and methods
    of types) at parse time.
    
    A new parser flag, DeclarationErrors, enables error messages
    related to declaration errors (as far as it is possible to
    provide them).
    
    The resulting AST has all (non-field, non-method) identifiers
    resolved that can be resolved w/o doing imports or parsing
    missing package files.
    
    The ast.File node contains the (partially complete)
    package scope and a list of unresolved global identifiers.
    
    All type-specific data structures have been removed from the AST.
    
    The existing typechecker is functional but needs to be adjusted
    (simplified) accordingly. Utility functions to resolve all
    identifiers for a package (after handling imports and parsing
    all package files) are  missing.
    
    Unrelated changes:
    - Rename typechecker/testdata files to that they are not considered
      by gofmt.
    - Minor cleanups/simplifications.
    
    Parses all .go files in src and misc without declaration errors.
    Runs all tests. Changes do not affect gofmt output.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/4244049
    021b040a
Name
Last commit
Last update
..
Makefile Loading commit data...
abort.go Loading commit data...
bridge.go Loading commit data...
compiler.go Loading commit data...
eval_test.go Loading commit data...
expr.go Loading commit data...
expr1.go Loading commit data...
expr_test.go Loading commit data...
func.go Loading commit data...
gen.go Loading commit data...
main.go Loading commit data...
scope.go Loading commit data...
stmt.go Loading commit data...
stmt_test.go Loading commit data...
test.bash Loading commit data...
type.go Loading commit data...
typec.go Loading commit data...
value.go Loading commit data...
world.go Loading commit data...