Zig: remove octal and binary float literals from the language

Created on 22 Mar 2019  路  3Comments  路  Source: ziglang/zig

Either document them or remove them from the language.

If they are removed from the language then the code in tokenizer.cpp that doesn't call bigfloat_init_buf can be deleted. If they stay in the language, zig should probably reformat the string to match hex float literals and still have the same float parsing code handle them.

accepted breaking contributor friendly proposal

Most helpful comment

i vote for removal

All 3 comments

i vote for removal

This isn't quite solved yet, still needs to be removed from the grammar [1] [2] and stage2 parser.

The grammar changes are done thanks to @mokulus.

As to the stage2 parser, I think the tokenizer can allow octal and binary float literals, and then semantic analysis can reject them as invalid format. We already defer float parsing to semantic analysis in stage2. So this can be considered closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

komuw picture komuw  路  3Comments

andrewrk picture andrewrk  路  3Comments

jayschwa picture jayschwa  路  3Comments

andrewrk picture andrewrk  路  3Comments

dobkeratops picture dobkeratops  路  3Comments