From c48f13eec64f066766b95751c8033e5127964560 Mon Sep 17 00:00:00 2001 From: Miikka Salminen Date: Sat, 6 Feb 2016 22:01:49 +0200 Subject: Add tokens for string affixes and heredoc delimiters. Add lexing for them in C/C++, Perl, PHP, Python and Ruby. Update my old style Lovelace accordingly. --- tests/examplefiles/example2.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/examplefiles/example2.cpp (limited to 'tests/examplefiles/example2.cpp') diff --git a/tests/examplefiles/example2.cpp b/tests/examplefiles/example2.cpp new file mode 100644 index 00000000..ccd99383 --- /dev/null +++ b/tests/examplefiles/example2.cpp @@ -0,0 +1,20 @@ +/* + * A Test file for the different string literals. + */ + +#include + +int main() { + char *_str = "a normal string"; + wchar_t *L_str = L"a wide string"; + char *u8_str = u8"utf-8 string"; + char16_t *u_str = u"utf-16 string"; + char32_t *U_str = U"utf-32 string"; + char *R_str = R""""(raw string with +""" +as a delimiter)""""; + + std::cout << R_str << std::endl; + + return 0; +} -- cgit v1.2.1