We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 319156c commit df9cf0bCopy full SHA for df9cf0b
src/comp/front/lexer.rs
@@ -632,6 +632,9 @@ fn next_token(&reader rdr) -> token::token {
632
case ('"') {
633
str::push_byte(accum_str, '"' as u8);
634
}
635
+ case ('\n') {
636
+ consume_whitespace(rdr);
637
+ }
638
639
case ('x') {
640
str::push_char(accum_str,
src/test/run-pass/str-multiline.rs
@@ -0,0 +1,15 @@
1
+// -*- rust -*-
2
+
3
+use std;
4
+import std::str;
5
6
+fn main() {
7
+ let str a = "this \
8
+is a test";
9
+ let str b = "this \
10
+ is \
11
+ another \
12
+ test";
13
+ assert (str::eq(a, "this is a test"));
14
+ assert (str::eq(b, "this is another test"));
15
+}
0 commit comments