Skip to content

Commit 959631f

Browse files
committed
---
yaml --- r: 14183 b: refs/heads/try c: f9a63ef h: refs/heads/master i: 14181: 14ae7b0 14179: 251b107 14175: e4eba97 v: v3
1 parent 01d5e2a commit 959631f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: d808df893a085205cb6e113ce98ac09accbc595a
5+
refs/heads/try: f9a63efb8214a36b13545b158bf27c1b6540b650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/syntax/parse/lexer.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ impl reader for reader {
4343
let next = str::char_range_at(*self.src, self.pos);
4444
self.pos = next.next;
4545
self.curr = next.ch;
46-
} else { self.curr = -1 as char; }
46+
} else {
47+
if (self.curr != -1 as char) {
48+
self.col += 1u;
49+
self.chpos += 1u;
50+
self.curr = -1 as char;
51+
}
52+
}
4753
}
4854
fn fatal(m: str) -> ! {
4955
self.span_diagnostic.span_fatal(

branches/try/src/test/run-pass/qquote.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ fn main() {
7676

7777
let pat = #ast(pat){some(_)};
7878
check_pp(pat, pprust::print_pat, "some(_)");
79+
80+
// issue #1785
81+
let x = #ast{1};
82+
let test1 = #ast{1+$(x)};
83+
check_pp(test1, pprust::print_expr, "1 + 1");
7984
}
8085

8186
fn check_pp<T>(expr: T, f: fn(pprust::ps, T), expect: str) {

0 commit comments

Comments
 (0)