Skip to content

Commit 156e37c

Browse files
committed
---
yaml --- r: 15601 b: refs/heads/try c: 92b2113 h: refs/heads/master i: 15599: e7664bb v: v3
1 parent 3f0627a commit 156e37c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
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: fa86b5d67f22796797aac1f2f6267e270b1ba5d4
5+
refs/heads/try: 92b21135831b5d8ee56f6590e0d2f43173873532
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/librustsyntax/parse/comments.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,6 @@ fn consume_comment(rdr: reader, code_to_the_left: bool, &comments: [cmnt]) {
148148
#debug("<<< consume comment");
149149
}
150150

151-
fn is_lit(t: token::token) -> bool {
152-
ret alt t {
153-
token::LIT_INT(_, _) { true }
154-
token::LIT_UINT(_, _) { true }
155-
token::LIT_FLOAT(_, _) { true }
156-
token::LIT_STR(_) { true }
157-
_ { false }
158-
}
159-
}
160-
161151
type lit = {lit: str, pos: uint};
162152

163153
fn gather_comments_and_literals(span_diagnostic: diagnostic::span_handler,
@@ -186,7 +176,7 @@ fn gather_comments_and_literals(span_diagnostic: diagnostic::span_handler,
186176
break;
187177
}
188178
let tok = next_token(rdr);
189-
if is_lit(tok.tok) {
179+
if token::is_lit(tok.tok) {
190180
let s = rdr.get_str_from(tok.bpos);
191181
literals += [{lit: s, pos: tok.chpos}];
192182
log(debug, "tok lit: " + s);

branches/try/src/librustsyntax/parse/token.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ pure fn can_begin_expr(t: token) -> bool {
187187
}
188188
}
189189

190+
fn is_lit(t: token::token) -> bool {
191+
ret alt t {
192+
token::LIT_INT(_, _) { true }
193+
token::LIT_UINT(_, _) { true }
194+
token::LIT_FLOAT(_, _) { true }
195+
token::LIT_STR(_) { true }
196+
_ { false }
197+
}
198+
}
199+
190200
fn is_ident(t: token::token) -> bool {
191201
alt t { token::IDENT(_, _) { ret true; } _ { } }
192202
ret false;

0 commit comments

Comments
 (0)