fix(AstNode::bundle_comments): don't bundle at A, // comment \n B
#588
No reviewers
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#588
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ada4a/mergiraf:bundle-comments-fix1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #586
ctx.parse
track the caller 47e3624cfdAstNode::ascii_tree
: addcolorize: bool
parameter 837ec150f6match
c465180f2975b715d451
to9d9b17afdd
@ -870,0 +1090,4 @@
let rs = ctx.parse("a.rs", source);
assert_eq!(rs.ascii_tree(Some(5), false), BUNDLED_INTO_ABOVE);
}
The comment says don't bundle but the test asserts that it does - or do I misunderstand the comment? There are a couple of similar cases below.
No, you're right -- the comments got out of sync when copy-pasting.. To help that a little, I removed all the comments from the tests where
expected
is a constant, because the name of the constant already describes what the expectation is.@ -870,0 +1158,4 @@
let rs = ctx.parse("a.rs", source);
assert_eq!(rs.ascii_tree(Some(4), false), BUNDLED_INTO_ABOVE_SAME_LINE);
}
I'm curious why you went for a macro and not just a loop. Is the error reporting better when some assertion fails?
I expected it to be, but that turns out not to be the case.. Replaced with a loop
9d9b17afdd
to5d987e2208
5d987e2208
to49bf47c2d3