Closed robalni closed 4 years ago
It'd be great if you could add some comments if possible, since you seem to understand the compiler quite a bit
running this:
echo "testacle" /*
echo "test"
*/ echo "lala"
results in
testacle echo lala
which is theoretically not a big deal but I think it'd be nice if
the */
is on another line than /*
if it'd act like a ;
, that way you don't combine parts that aren't meant to be combined
Logically the behaviour you see there should be the correct one because you commented out the statement terminator (newline) and therefore the statements should become the same statement. I can also see why it should not be the correct behaviour because in a line-based language, statements on different lines should be different statements. This makes me feel like multiline comments might not be a good idea in line-based languages because it's not obvious what the correct behaviour should be. The main problem is that newline characters are invisible and that you can't put the comment-start in the end of the line after the newline character, otherwise it would be obvious what should happen. I don't know what the best thing to do here is.
I mean, it wouldn't be that big of a deal to leave it as-is tbh
This pull request adds
/* this type of comment */
to cubescript, requested by @MoonPadUSer.