v0.22.0
Breaking changes are marked with !
.
Additions:
LANGUAGE_VERSION
MIN_COMPATIBLE_LANGUAGE_VERSION
Point(row, column)
Language.__repr__()
Language.__eq__()
: checksptr
Language.__int__()
: returnsptr
Language.__index__()
: returnsptr
Language.__hash__()
: returnsptr
Node.__str__()
: returns the S-expressionTreeCursor.goto_first_child_for_point(point)
TreeCursor.__copy__()
: returnscopy()
Query(language, source)
Parser(language, included_ranges, timeout_micros)
Parser.language
(getter + setter)Parser.included_ranges
(getter + setter)Parser.timeout_micros
(getter + setter)Range.__hash__()
Deprecations:
Node.sexp()
: usestr()
Tree.text
: useroot_node.text
TreeCursor.goto_first_child_for_point(row, column)
: usegoto_first_child_for_point(point)
LookaheadIterator.reset(language, state)
: usereset_state(state, language)
Parser.set_language(language)
: useParser(language)
orlanguage
setterParser.set_included_ranges(ranges)
: useincluded_ranges
setterParser.set_timeout_micros(timeout)
: usetimeout_micros
setter
Removals:
Language(path, name)
!Language.build_library(...)
!Language.name
!Language.lib
Language.language_id
: useint()
Changes:
Language()
only accepts a single integer argument. !Parser.parse(...)
accepts an optionalencoding
argument. !TreeCursor.descendant_index
is changed to a property. !LookaheadIterator.language
returns aLanguage
instance. !LookaheadIterator.reset_state(...)
accepts an optionallanguage
argument.Query.captures(...)
arguments must be keywords (except fornode
).Query.matches(...)
arguments must be keywords (except fornode
).Range.__repr__()
prints attributes in the same order as theRange()
arguments.Range()
arguments are no longer considered optional.