syntax: methodify the lexer
This commit is contained in:
parent
5343eb7e0c
commit
46d1af28b5
8 changed files with 1195 additions and 1187 deletions
|
@ -34,7 +34,7 @@ pub fn highlight(src: &str, class: Option<&str>) -> String {
|
|||
|
||||
let mut out = io::MemWriter::new();
|
||||
doit(&sess,
|
||||
lexer::new_string_reader(&sess.span_diagnostic, fm),
|
||||
lexer::StringReader::new(&sess.span_diagnostic, fm),
|
||||
class,
|
||||
&mut out).unwrap();
|
||||
str::from_utf8_lossy(out.unwrap().as_slice()).to_string()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue