feat: improve autoformatting algorithm

- tons of new tests for various cases to be consistent
This commit is contained in:
Jonathan Kelley committed 2022-04-26 18:45:08 -04:00
1 parent 36ba49fe27
commit 804d9af1c7
3 files changed
+321 -44

No files matched your search

+9
View File
@@ -23,6 +23,15 @@ pub enum BodyNode {
Meta(String),
}
impl BodyNode {
pub fn is_litstr(&self) -> bool {
match self {
BodyNode::Text(_) => true,
_ => false,
}
}
}
impl Parse for BodyNode {
fn parse(stream: ParseStream) -> Result<Self> {
if stream.peek(LitStr) {