# remove unreachable code paths from std.zig.Ast.lastToken · gitcafe/zig

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

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

Visibility: public

Requested revision: ad38af77fa8ef3fe6938365258e198696fbf53d9

Requested commit: ad38af77fa8ef3fe6938365258e198696fbf53d9

Commit: ad38af77fa8ef3fe6938365258e198696fbf53d9

Tree: 00e4a5d103fb0b9686735d1ff953fd5c84b848a2

Author: Techatrix

Committer: Techatrix

## Message

```
remove unreachable code paths from std.zig.Ast.lastToken

This function checks for various possibilities that are never produced
by the parser.
Given that lastToken is unsafe to call on an Ast with errors, I also
removed code paths that would be reachable on an Ast with errors.

```

## Parents

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

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