QB64Team / qb64

BASIC for the modern era.
https://www.qb64.org
Other
672 stars 96 forks source link

Make `$NOPREFIX`-friendly versions of `$COLOR` includes #206

Closed aouwt closed 3 years ago

aouwt commented 3 years ago

see issue #205

aouwt commented 3 years ago

Huh... when I test the modified code, everything works fine until I use one of the constants and using $NOPREFIX, which then it throws a Name already in use error.

like:

  $NOPREFIX
  $COLOR:0
- PRINT C_Blue
Name already in use (C_Blue) on line 3

wont compile


  '$NOPREFIX
  $COLOR:0
  PRINT Blue
OK

outputs 14 :heavy_check_mark:


  '$NOPREFIX
  $COLOR:0
  PRINT C_Blue
OK

outputs 0 :heavy_check_mark:

aouwt commented 3 years ago

but the bis don't throw any errors by themselves, which is confusing....

only when actually using the consts does it throw an error

and if i manually include the new color.bis it works fine????

FellippeHeitor commented 3 years ago

and if i manually include the new color.bis it works fine????

LOL! Just how?

aouwt commented 3 years ago

idk, thats what ive been trying to figure out myself

imma try compiling with the debug flags and stuff in a little bit (note to future me: do this)

aouwt commented 3 years ago

procrastination go brr—still haven't done that yet 😅...

@FellippeHeitor — do you know if meta includes are handled differently than regular includes?

FellippeHeitor commented 3 years ago

They should be treated the same internally.

aouwt commented 3 years ago

Okay, so it seems that the normal BIs are still included, and it seems like they are indeed treated differently. Take a look at this log. At the beginning, it seems to be running the new BIs as normal includes. However, when we go to line 2457, it begins to process the old BIs as if they were part of the main module. This seems like it'd be a deeper operation than i initially thought! :sweat_smile:

aouwt commented 3 years ago

found it lol :facepalm:

aouwt commented 3 years ago

Is this how you properly update the help files or is there another part of the process?

FellippeHeitor commented 3 years ago

We actually update the wiki, the help files are fetched from there later on.

aouwt commented 3 years ago

Ah, sorry.

I can't seem to create a wiki account, is there some way I can create one? (Without requesting one via Discord, at the moment I don't have access to Discord and probably won't for a while)

FellippeHeitor commented 3 years ago

Need a valid email and desired user name - you can ping me at contact@qb64.org

aouwt commented 3 years ago

Okay, i have sent the email. Should i revert the changes here or just leave them?

aouwt commented 3 years ago

I'm going to refrain from editing the wiki until my PR gets merged so nobody gets confused, is that okay?