I'm trying to make a string with a certain combination of characters which is causing compiler errors. I want to make a string with the following characters:
pstvx14.,?/="+ |
With the escape character for the quote mark, it should be:
str="pstvx14.,?/=\"+" |
If you copy just that line into PICO-8 and try and run it, you'll get the following error:
syntax error line 1 <eof> <name> expected near ',' |
If you delete the . then the , then the ? you'll get a different error each time (unexpected symbol, syntax error). If you then delete the / it's fine, so the following string is ok:
str="pstvx14=\"+" |
Different combinations of punctuation will give varying errors. It seems like this is a parser error?
There's also a highlighting error when you have a string containing just the backslash character:
str="\\" --this should be grey not blue --the blue stops here:" grey |
This code compiles and runs fine because it's valid syntax, but the editor doesn't highlight it correctly.
And it counts the tokens in this case! Reported this two weeks ago.
[Please log in to post a comment]