Accept multiple exported constants if they agree on a value
evie-calico opened this issue · 3 comments
see: eievui5/evscript#11
This would be useful in generated code where an exported constant is necessary but it's unclear which file should be the one to export it.
To be clear, DEF x EQU y
would be accept if it's already the case that x == y
? (Same goes for DEF x = y
. Same goes for RB/RW/RL
?)
What about EQUS
? Probably yes also?
...What about labels? Or macros? Should you be allowed to say Foo:
and then Foo:
again?
Oh wait, sorry, exported vars. So RGBASM behavior would be unchanged, but RGBLINK would accept multiple identical definitions from multiple object files?
Yes. Right now this doesn't compile:
; foo.asm
def CONSTANT equ 1
export CONSTANT
; bar.asm
def CONSTANT equ 1
export CONSTANT
...which was an issue for evscript's generated constants, because ISSO wanted them to be exported. Since these values are both the same it's not an issue that they're defined in two places, so it'd be nice if RGBLINK could accept them.