Releases: AndroidIDEOfficial/android-tree-sitter
v4.3.1
v4.3.0
v4.2.0
android-tree-sitter
v4.2.0 (2024-03-16)
Added
-
feat(node): add support for TSNode.getGrammarSymbol() (Akash Yadav)
-
feat(tree): add support for TSTree.getIncludedRanges() (Akash Yadav)
-
feat(tree): add support for TSTree.getRootNodeWithOffset(int, TSPoint) (Akash Yadav)
Fixed
v4.1.0
v4.0.1
v4.0.0
android-tree-sitter v4.0.0
This is a major release of Android Tree Sitter which includes the following changes :
- Maven group ID for ATS has been changed from
com.itsaky.androididetocom.itsaky.androidide.treesitter. - New
TSObjectFactoryandTSObjectFactoryProviderAPIs to allow usage of customTS*objects.- This change makes constructors of all TS objects
protected so that they can only be accessed within the same package and in
subclasses. Every TS object now provides
a staticcreatemethod to create instances of the same. Users are expected
to use those methods to create instances of the corresponding classes instead of using the factory directly. - You can configure a custom
TSObjectFactorywhich would create customTS*objects. This can be used to implement recyclable objects.
- This change makes constructors of all TS objects
publicfields inTS*classes are nowprotectedand provide getters/
setters for better encapsulation.- Native methods now also check the validity of the native object before they are accessed. If the native object pointer provided to a native method is invalid (null pointer), an
IllegalArgumentExceptionis thrown. TSQueryCursor:TSQueryCursornow checks whether a query has been executed whennextMatchandremoveMatchare called. If not, it throws anIllegalStateException.- When executing a query, related
TS*objects are now checked for access (e.g. cursor, query, node, etc). - The query cursor now does not allow executing queries on changed nodes i.e nodes for which
TSNode.hasChanges()returnstrue. This behavior can be changed withTSQueryCursor.setAllowChangedNodes(boolean). - Query cursors are now
Iterable<TSQueryMatch>.
TSNode:- New APIs :
edit(TSInputEdit)getNextParseState()getDescendantCount()getGrammarType()getLanguage()
- New APIs :
TSParser:TSParserparse operation is now cancellable. You can request cancellation for the previousTSParser.parse(...)call with :requestCancellationAsync: Request cancellation asynchronously.requestCancellationAndWait: Requests cancellation and blocks the current thread until theparseis cancelled.
TSParser.parse(...)now throws aParseInProgressExceptionif a parse operation is already in progress. You can check whether a parser is parsing a syntax tree withTSParser.isParsing().
v3.4.0
android-tree-sitter
v3.4.0 (2023-09-26)
Added
Fixed
v3.3.0
v3.2.0
v3.1.0
android-tree-sitter
v3.1.0 (2023-06-18)
Fixed
-
fix: use language name and pointer to efficiently remove entries in TSLanguageCache.remove (Akash Yadav)
-
fix: remove cache entries in TSLanguageCache.closeExternal (Akash Yadav)
-
fix: only close external languages in TSLanguageCache.closeAll (Akash Yadav)
-
fix: remove externally loaded languages from cache once closed (Akash Yadav)
-
fix: use TSLanguageCache return instance of TSLanguage in TSParser and TSTree (Akash Yadav)
-
fix: replace usage of deprecated TSLanguage*.newInstance() with TSLanguage*.getInstance() (Akash Yadav)
-
fix: error_offset and error_type is not set to TSQuery (Akash Yadav)
Added
-
feat: add TSLanguage.isExternal() to check for external languages (Akash Yadav)
-
feat: add TSLanguageCache.closeAll() to close all TSLanguage instances (Akash Yadav)
-
feat: use TSLanguageCache in TSLanguage.loadLanguage (Akash Yadav)
-
feat: add convenience method to load TSLanguage using nativeLibDir from Context (Akash Yadav)
-
feat: check access before accessing native objects (Akash Yadav)
-
feat: add support for loading external grammars (Akash Yadav)