v0.11 syntax error using a'b instead of b`a syntax for a constant with a specified width
sparr opened this issue · 2 comments
sparr commented
With v0.10 the literal a'b
represented the constant b
output with a width of a
bits, equivalent to b`a
. In 0.11.7, this syntax produces an error 'invalid digits'.
The lowest level code for calculating widths and parsing '
characters hasn't changed. '
is still a valid character in is_number_mid
and still recognized as the separator in parse_width
. I wasn't able to track down the change in behavior.
Test case:
v0.10
#cpudef
{
x -> 8'5
}
x
outputs 0x05
v0.11.7
#ruledef
{
x => 8'5
}
x
error invalid digits
for the 8'5
excerpt
hlorenzi commented
I think it was my intention to deprecate the old syntax, so I've now completely removed the residual code!
The intended way to do this moving forward is with the backquote syntax 8`5
.
sparr commented
Could we get a mention in the docs, perhaps in a section dedicated to
deprecated functionality, so that people will know how to update old code?
This was nontrivial for me because I didn't know what the syntax I was
seeing was supposed to do. I had to read the source and/or browse old
versions.
…On Sun, Feb 19, 2023, 23:58 Lorenzi ***@***.***> wrote:
I think it was my intention to deprecate the old syntax, so I've now
completely removed the residual code!
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5TU7KZZF6D22E3QC2EDTWYK6S5ANCNFSM6AAAAAAS3QIWLY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>