Skip to content

v0.23.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Aug 15:45
· 24 commits to master since this release
876fd40

Additions:

  • Node.child_containing_descendant(descendant)
  • Tree.language (getter)
  • Query.pattern_count (getter)
  • Query.capture_count (getter)
  • Query.match_limit (getter)
  • Query.did_exceed_match_limit (getter)
  • Query.set_match_limit(match_limit): returns self
  • Query.set_max_start_depth(max_start_depth): returns self
  • Query.set_byte_range(byte_range): returns self
  • Query.set_point_range(point_range): returns self
  • Query.disable_pattern(index): returns self
  • Query.disable_capture(capture): returns self
  • Query.pattern_settings(index)
  • Query.pattern_assertions(index)
  • Query.start_byte_for_pattern(index)
  • Query.end_byte_for_pattern(index)
  • Query.is_pattern_rooted(index)
  • Query.is_pattern_non_local(index)
  • Query.is_pattern_guaranteed_at_step(offset)
  • QueryError (exception class)
  • QueryPredicate (typing protocol)

Removals:

  • Parser.set_language(language)
  • Parser.set_included_ranges(ranges)
  • Parser.set_timeout_micros(timeout)
  • Node.sexp()
  • Tree.text()
  • TreeCursor.goto_first_child_for_point(row, column)
  • LookaheadIterator.reset(language, state)

Changes:

  • Language() accepts a capsule as an argument.
  • Parser.parse(...) no longer accepts a keep_text argument.
  • Query.captures(...)
    • Range arguments were removed (use set_* instead).
    • Added an argument for custom query predicates.
    • Return type was changed to dict[str, list[Node]].
  • Query.matches(...)
    • Range arguments were removed (use set_* instead).
    • Added an argument for custom query predicates.
    • Return type was changed to list[tuple[int, dict[str, list[Node]]]].
  • TreeCursor.goto_first_child_for_byte(byte) returns int | None.
  • TreeCursor.goto_first_child_for_point(point) returns int | None.