# allow \`\_\` separators in number literals \(stage 1\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 7aac21c6f59b70deea6ced617f7b6a550e92bab4

Requested commit: 7aac21c6f59b70deea6ced617f7b6a550e92bab4

Commit: 7aac21c6f59b70deea6ced617f7b6a550e92bab4

Tree: df02c3553e9c5d66a858c73eaed7b25d723676df

Author: momumi

Committer: momumi

## Message

```
allow `_` separators in number literals (stage 1)

* Underscores `_` may be placed between two digits in a int/float literal
* Consecutive underscores are not allowed
* Fixed parsing bug in exponents of hexadecimal float literals.
  Exponents should always be base 10, but hex characters would be parsed
  inside the exponent and everything after them would be ignored. eg:
  `0x1.0p1ab1` would be parsed as `0x1.0p1`.

```

## Parents

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

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