use ast::{Attribute, MacDelimiter, GenericArg};
use util::parser::{self, AssocOp, Fixity};
use attr;
-use codemap::{self, CodeMap, Spanned};
+use codemap::{self, SourceMap, Spanned};
use syntax_pos::{self, BytePos};
use syntax_pos::hygiene::{Mark, SyntaxContext};
use parse::token::{self, BinOpToken, Token};
pub struct State<'a> {
pub s: pp::Printer<'a>,
- cm: Option<&'a CodeMap>,
+ cm: Option<&'a SourceMap>,
comments: Option<Vec<comments::Comment> >,
literals: Peekable<vec::IntoIter<comments::Literal>>,
cur_cmnt: usize,
/// Requires you to pass an input filename and reader so that
/// it can scan the input text for comments and literals to
/// copy forward.
-pub fn print_crate<'a>(cm: &'a CodeMap,
+pub fn print_crate<'a>(cm: &'a SourceMap,
sess: &ParseSess,
krate: &ast::Crate,
filename: FileName,
}
impl<'a> State<'a> {
- pub fn new_from_input(cm: &'a CodeMap,
+ pub fn new_from_input(cm: &'a SourceMap,
sess: &ParseSess,
filename: FileName,
input: &mut dyn Read,
if is_expanded { None } else { Some(lits) })
}
- pub fn new(cm: &'a CodeMap,
+ pub fn new(cm: &'a SourceMap,
out: Box<dyn Write+'a>,
ann: &'a dyn PpAnn,
comments: Option<Vec<comments::Comment>>,