feat: improve autoformatting algorithm
- tons of new tests for various cases to be consistent
This commit is contained in:
1 parent
36ba49fe27
commit
804d9af1c7
3 files changed
+321
-44
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user