hlorenzi/customasm

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

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