Skip to content

Commit 63aa6a0

Browse files
committed
---
yaml --- r: 208559 b: refs/heads/snap-stage3 c: 4f82c31 h: refs/heads/master i: 208557: f6d5af6 208555: 6fdfd79 208551: 0ea007c 208543: 088371a v: v3
1 parent 6e2822a commit 63aa6a0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: aef0581513f3fd01068cb423d9c62cb48b3f077a
4+
refs/heads/snap-stage3: 4f82c3151b063a4226f33df047d4e748ef5e3f13
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libsyntax/parse/lexer/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,4 +1565,13 @@ mod tests {
15651565
assert_eq!(lexer.next_token().tok, token::Literal(token::Char(token::intern("a")), None));
15661566
}
15671567

1568+
#[test] fn crlf_comments() {
1569+
let sh = mk_sh();
1570+
let mut lexer = setup(&sh, "// test\r\n/// test\r\n".to_string());
1571+
let comment = lexer.next_token();
1572+
assert_eq!(comment.tok, token::Comment);
1573+
assert_eq!(comment.sp, ::codemap::mk_sp(BytePos(0), BytePos(7)));
1574+
assert_eq!(lexer.next_token().tok, token::Whitespace);
1575+
assert_eq!(lexer.next_token().tok, token::DocComment(token::intern("/// test")));
1576+
}
15681577
}

0 commit comments

Comments
 (0)