digitalmars.D - Tokenized Strings -- Are Arbitrary Characters Valid?
- Mehrdad (6/6) Jun 12 2011 I'm a little confused on tokenized strings -- are the following valid?
- Bernard Helyer (5/5) Jun 13 2011 All they are is passed through the tokeniser to ensure they lex as valid...
- Bernard Helyer (2/9) Jun 13 2011 Back slash, rather.
- Bernard Helyer (2/2) Jun 13 2011 Actually, the \u stuff indicates a literal and not an actual token, so
I'm a little confused on tokenized strings -- are the following valid? Are they supposed to be? q{\u000A} q{"} q{\} Thanks!
Jun 12 2011
All they are is passed through the tokeniser to ensure they lex as valid D (not parse). http://d-programming-language.org/lex.html A naked slash is not a valid token on its own, AFAIK, so it shouldn't work. But the other two are fine.
Jun 13 2011
On Mon, 13 Jun 2011 12:13:13 +0000, Bernard Helyer wrote:All they are is passed through the tokeniser to ensure they lex as valid D (not parse). http://d-programming-language.org/lex.html A naked slash is not a valid token on its own, AFAIK, so it shouldn't work. But the other two are fine.Back slash, rather.
Jun 13 2011
Actually, the \u stuff indicates a literal and not an actual token, so the only actually valid one is '"'. Third time's the charm!
Jun 13 2011