Monday, February 1, 2016

Another comment syntax! What horror!

Someone linked to this thread at the LoCaA Skype group when I mentioned source code. Apparently, it's not the full Danmakufu source code (and even then it was before PH3), but rather only the language interpreter. Sigh, we might as well give up all hope of getting any kind of source, even with this handy doing-Marisa's-job-tool.

//skip whitespace
        while(* current == 13 || * current == 10 || * current == 9 || * current == 32
           || * current == '#' || (* current == '/' && (current[1] == '/' || current[1] == '*')))
           {
                   //skip comments
                   if(* current == '#' ||
                           (* current == '/' && (current[1] == '/' || current[1] == '*')))
                   {
                           if(* current == '#' || current[1] == '/')
                           {
Wait, what?!!

I tested it, and it seems that # can also act as a valid start of comment, just like //, even under PH3. I don't know why any of you would need that, but there you go, for some extra variety!

* draws a summon mkm sigil *

No comments:

Post a Comment