# stage2 parser: don't append doc comments to the list · gitcafe/zig

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

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

Visibility: public

Requested revision: 295bca9b5f397ff98e5a0162fcb2a9f5e0a3e35c

Requested commit: 295bca9b5f397ff98e5a0162fcb2a9f5e0a3e35c

Commit: 295bca9b5f397ff98e5a0162fcb2a9f5e0a3e35c

Tree: 96ca941e76281f9868057db1b496856adc13e256

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 parser: don't append doc comments to the list

The DocComment AST node now only points to the first doc comment token.
API users are expected to iterate over the following tokens directly.

After this commit there are no more linked lists in use in the
self-hosted AST API.

Performance impact is negligible. Memory usage slightly reduced.

```

## Parents

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

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