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

Error when trying to use a string as a typed argument #114

Closed jonicho closed 3 years ago

jonicho commented 3 years ago

When you try to use a string as a typed argument the assembler outputs the error "error: wrong argument for type `i8`". For example when you try to assemble the following:

#ruledef {
    load {value: i8} => 0xaa @ value
}

load "a"

The assembler outputs:

error: failed to resolve instruction
 --> test.asm:5:1:
 3 | } 
 4 |  
 5 | load "a" 
   | ^^^^^^^^  
 6 | 
 === error: wrong argument for type `i8`
 --> test.asm:5:6:
 3 | } 
 4 |  
 5 | load "a" 
   |      ^^^  
 6 | 

This is probably related to #113 since it seems to have been introduced in the commit 4e1426c811c4609fda00dc1845f4bb50f9df1368 too.