wrap method

void wrap(
  1. BlockNode block
)

Wraps this line with new parent block.

This line can not be in a BlockNode when this method is called.

Implementation

void wrap(BlockNode block) {
  assert(parent != null && parent is! BlockNode);
  insertAfter(block);
  unlink();
  block.add(this);
}