Allow attributes on top level expression
A top level expression is either - a expression statement or - the last expression in a block
This commit is contained in:
@@ -105,7 +105,9 @@ pub(super) fn process(sink: &mut dyn TreeSink, mut events: Vec<Event>) {
|
||||
// append `A`'s forward_parent `B`
|
||||
fp = match mem::replace(&mut events[idx], Event::tombstone()) {
|
||||
Event::Start { kind, forward_parent } => {
|
||||
forward_parents.push(kind);
|
||||
if kind != TOMBSTONE {
|
||||
forward_parents.push(kind);
|
||||
}
|
||||
forward_parent
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
||||
Reference in New Issue
Block a user