debugging inline comment bug

This commit is contained in:
Anton-4 2021-12-01 16:57:28 +01:00
parent 30c1d218a7
commit 5bd776f972
17 changed files with 206 additions and 30 deletions

View file

@ -321,6 +321,15 @@ impl<'a> CommentOrNewline<'a> {
DocComment(_) => false,
}
}
pub fn to_string(&self) -> std::string::String {
use CommentOrNewline::*;
match self {
Newline => "\n".to_owned(),
LineComment(comment_str) => format!("#{}",comment_str),
DocComment(comment_str) => format!("##{}",comment_str),
}
}
}
#[derive(Clone, Copy, Debug, PartialEq)]