Skip to content

Commit 435b6b3

Browse files
committed
---
yaml --- r: 3065 b: refs/heads/master c: a1edf91 h: refs/heads/master i: 3063: e121844 v: v3
1 parent af04056 commit 435b6b3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 700c525c4f5ce3ade2ffdc8b584f42595763b145
2+
refs/heads/master: a1edf91f4882e9322ade619dd5607f3dd2751158

trunk/src/comp/front/lexer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,10 @@ fn gather_comments_and_literals(session sess, str path)
891891
auto rdr = new_reader(sess, srdr, codemap::new_filemap(path, 0u), itr);
892892
let vec[cmnt] comments = [];
893893
let vec[lit] literals = [];
894+
let bool first_read = true;
894895
while (!rdr.is_eof()) {
895896
while (true) {
896-
auto code_to_the_left = true;
897+
auto code_to_the_left = !first_read;
897898
consume_non_eol_whitespace(rdr);
898899
if (rdr.curr() == '\n') {
899900
code_to_the_left = false;
@@ -909,6 +910,7 @@ fn gather_comments_and_literals(session sess, str path)
909910
vec::push[lit](literals, rec(lit=rdr.get_mark_str(),
910911
pos=rdr.get_mark_chpos()));
911912
}
913+
first_read = false;
912914
}
913915
ret rec(cmnts=comments, lits=literals);
914916
}

0 commit comments

Comments
 (0)