-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: rewrite API #208
Merged
feat!: rewrite API #208
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ObserverOfTime
force-pushed
the
rewrite
branch
27 times, most recently
from
March 15, 2024 21:27
6c75b32
to
259e8c9
Compare
Plus many codebase improvements Plus Query & Parser constructors
Viicos
reviewed
Apr 29, 2024
And use Sphinx to generate HTML docs
ObserverOfTime
force-pushed
the
rewrite
branch
10 times, most recently
from
May 2, 2024 16:15
631f3d0
to
6bf0eae
Compare
It's finally done! @amaanq |
ObserverOfTime
force-pushed
the
rewrite
branch
4 times, most recently
from
May 9, 2024 18:56
d2e14c9
to
a6ae583
Compare
And fix remaining issues
KuCoinEneko
approved these changes
May 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting with the type stubs to show what the new API will look like (subject to change).
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
setterRemovals:
Language(path, name)
!Language.build_library(...)
!Language.name
!Language.lib
Language.language_id
: useint()
Changes:
Language()
only accepts a single integer 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.Internals: