We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef0581 commit 4f82c31Copy full SHA for 4f82c31
src/libsyntax/parse/lexer/mod.rs
@@ -1565,4 +1565,13 @@ mod tests {
1565
assert_eq!(lexer.next_token().tok, token::Literal(token::Char(token::intern("a")), None));
1566
}
1567
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
+ }
1577
0 commit comments