Skip to content

Commit ef9bf3a

Browse files
committed
auto merge of #14630 : cmr/rust/rewrite-lexer, r=alexcrichton
These are a pain to rebase, so I'm separating this from the rest of my work. Nothing controversial here, just some simple refactoring and removal of an unused entry in the token table. Brings the lexer into 2012 with methods!
2 parents 7645982 + 181e5f3 commit ef9bf3a

File tree

9 files changed

+1216
-1204
lines changed

9 files changed

+1216
-1204
lines changed

src/librustdoc/html/highlight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn highlight(src: &str, class: Option<&str>) -> String {
3434

3535
let mut out = io::MemWriter::new();
3636
doit(&sess,
37-
lexer::new_string_reader(&sess.span_diagnostic, fm),
37+
lexer::StringReader::new(&sess.span_diagnostic, fm),
3838
class,
3939
&mut out).unwrap();
4040
str::from_utf8_lossy(out.unwrap().as_slice()).to_string()

src/libsyntax/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use ast::{AttrId, Attribute, Attribute_, MetaItem, MetaWord, MetaNameValue, Meta
1515
use codemap::{Span, Spanned, spanned, dummy_spanned};
1616
use codemap::BytePos;
1717
use diagnostic::SpanHandler;
18-
use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
18+
use parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration};
1919
use parse::token::InternedString;
2020
use parse::token;
2121
use crateid::CrateId;

0 commit comments

Comments
 (0)