# parser: fix parsing/rendering of a\[b\.\. :c\] slicing · gitcafe/zig

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

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

Visibility: public

Requested revision: b988815bf0771dd86a345ce8ed8b0d3eb9d6f55e

Requested commit: b988815bf0771dd86a345ce8ed8b0d3eb9d6f55e

Commit: b988815bf0771dd86a345ce8ed8b0d3eb9d6f55e

Tree: fed9a51f338b4ada0bbebf6314bba22482813361

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
parser: fix parsing/rendering of a[b.. :c] slicing

The modification to the grammar in the comment is in line with the
grammar in the zig-spec repo.

Note: checking if the previous token is a colon is insufficent to tell
if a block has a label, the identifier must be checked for as well. This
can be seen in sentinel terminated slicing: `foo[0..1:{}]`

```

## Parents

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

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