Minga.Parser.StructuralNavResult (Minga v0.1.0)

Copy Markdown View Source

Result returned by tree-sitter structural navigation.

Positions are zero-indexed tree-sitter points. Columns are byte offsets within the line, matching the rest of the parser protocol.

Summary

Functions

Builds a structural navigation result.

Returns the cursor position for the start of the node.

Types

t()

@type t() :: %Minga.Parser.StructuralNavResult{
  end_col: non_neg_integer(),
  end_row: non_neg_integer(),
  start_col: non_neg_integer(),
  start_row: non_neg_integer(),
  type_name: String.t()
}

Functions

new(start_row, start_col, end_row, end_col, type_name)

Builds a structural navigation result.

start_position(structural_nav_result)

@spec start_position(t()) :: {non_neg_integer(), non_neg_integer()}

Returns the cursor position for the start of the node.