hlorenzi / customasm

💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Apache License 2.0
719 stars 56 forks source link

Cannot reference variables in #bankdef #168

Closed vxgmichel closed 1 year ago

vxgmichel commented 1 year ago

This is a regression starting with v0.13.0.

The following code used to work:

HEADER_SIZE = 0x34
#bankdef header {#addr 0, #size HEADER_SIZE, #outp 0}

Now it produces:

error: cannot reference variables in this context
 --> asm:2:33:
1 | HEADER_SIZE = 0x34 
2 | #bankdef header {#addr 0, #size HEADER_SIZE, #outp 0} 
  |                                 ^^^^^^^^^^^            
3 | 

Using variables in #bankdef is pretty convenient, any hope to see this fixed in a future release? :)

hlorenzi commented 1 year ago

Yeah, sorry! That's supposed to work. I'm working on it!

hlorenzi commented 1 year ago

Should work now on v0.13.1!