GeorgRottensteiner / C64Studio

C64Studio is a .NET based IDE specializing in game development for the C64 in assembler and BASIC
Other
252 stars 38 forks source link

Const value not shown in 'Find all references' #97

Closed mokdevel closed 12 months ago

mokdevel commented 12 months ago

Example below. Line numbers added for clarity. Once compiled, doing a right click -> Find all references on DEBUGVALUE only shows the reference found on lines 3 and 6 but NOT on line 10. Using version 7.5.

01 DEBUG
02 
03 DEBUGVALUE = 10
04
05 !ifdef DEBUG {
06   DEBUGVALUE = 11
07 }
08
09   * = $2000 
10   lda #DEBUGVALUE
11   sta $1fff
GeorgRottensteiner commented 12 months ago

Whoa, that's a good one. Due to internal handling and you redefining DEBUGVALUE there exist two symbols. This is by design, esp. required for debugging and for e.g. for loops. The find references code simply picks the first matching symbol it finds. Another minor issue is that the first symbol returned should not really have DEBUGVALUE=11 as reference :)

I'm on holidays so can't promise a quick fix. It shouldn't really take long though.

mokdevel commented 12 months ago

Not a show stopper. Go enjoy your holiday!

GeorgRottensteiner commented 12 months ago

Got around to look at it right away, should be fixed with commit #c6701a0b3e133925568545c865e98eabf2fd87eb

This of course also affected rename references.

mokdevel commented 12 months ago

Great to hear. I'll wait for the WIP to get updated. No rush. Thanks!

GeorgRottensteiner commented 12 months ago

WIP is updated with the fix inside, have at it!

mokdevel commented 12 months ago

Tested and works! Thanks!