google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go
BSD 3-Clause "New" or "Revised" License
2.34k stars 212 forks source link

spec: add '0' as valid decimal_lit #223

Closed mewmew closed 5 years ago

mewmew commented 5 years ago

Since each of octal_lit, hex_lit and binary_lit specify a mandatory prefix (e.g. 0o, 0x and 0b), we extend decimal_lit to allow for the decimal literal zero.

mewmew commented 5 years ago

Also included a fix of syntax highlighting in this PR.

Prior to 8216e79, data types were highlighted as follows:

2019-07-11-153440_1305x368_scrot

alandonovan commented 5 years ago

Thanks!