# stage2: implement semantic analysis for functions and global vars · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0c71d2fdc1cfa251b1c45a93724240a052c77a92)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0c71d2fdc1cfa251b1c45a93724240a052c77a92

Requested commit: 0c71d2fdc1cfa251b1c45a93724240a052c77a92

Commit: 0c71d2fdc1cfa251b1c45a93724240a052c77a92

Tree: f90f4d7e31b7e483aa1c826feb387c705e43abf5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: implement semantic analysis for functions and global vars

 * AstGen: add missing `break_inline` for comptime blocks.
 * Module: call getTree() in byteOffset(). This generates the AST when
   using cached ZIR and compile errors need to be reported.
 * Scope.File: distinguish between successful ZIR generation and AIR
   generation (when Decls in scope have been scanned).
   - `semaFile` correctly avoids doing work twice.
 * Implement first pass at `lookupInNamespace`. It has various TODOs
   left, such as `usingnamespace`, and setting up Decl dependencies.

```

## Parents

- [3462193d30e54c17123cfe1e666d8e575d649426](https://git.cafe/gitcafe/zig/commit/3462193d30e54c17123cfe1e666d8e575d649426?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0c71d2fdc1cfa251b1c45a93724240a052c77a92?format=markdown)
