nodeCovering method

  1. @Deprecated('Use the method defined on `CompilationUnit` instead.')
AstNode? nodeCovering({
  1. required int offset,
  2. int length = 0,
})

Returns the minimal covering node for the range of characters beginning at the offset with the given length.

Returns null if the range is outside the range covered by the receiver.

The minimal covering node is the node, rooted at the receiver, with the shortest length whose range completely includes the given range.

Implementation

@Deprecated('Use the method defined on `CompilationUnit` instead.')
AstNode? nodeCovering({required int offset, int length = 0}) {
  return (this as CompilationUnit).nodeCovering(
    offset: offset,
    length: length,
  );
}