.. (לתיקייה המכילה) | ||
What is the order of precedence between errors? | |
Whichever appears first in the stream of characters is to be handled first. E.g. if there is an illegal escape character in an unclosed string, the illegal character appears before the (nonexistent) end of the string and so will be handled first. |
My regexes are problematic. | |
Use a regex debugger! They let you see exactly what part of the string matches what. Here is a good one, but there are many others. Just be sure you use one that doesn't see . as "any character" but "any character other than \n". | |
קישור: Link: Ссылка: وصلة: | http://regexr.com/ |
What should I print for an error with \u and then not enough/not hex characters? u or the entire bad sequence? | |
Error undefined escape sequence u\n (Intuition: you don't actually know what the part of the string after \u that is intended to be in the escape sequence. That is, when it's correct, you don't need spaces between \u and anything else. E.g: "\u0065bc" is "Abc".) |
Does \u take only lowercase letters in its hex number? | |
No, both lowercase and uppercase. |
If there is an unprintable character within a string, what should be the error? | |
Use the "Error <char>\n" error template, where <char> should be the unprintable character. So, for our example Error ד |