Skip to content

Releases: AndroidIDEOfficial/android-tree-sitter

v4.3.1

17 Mar 17:39
fb827ce
Compare
Choose a tag to compare

android-tree-sitter

v4.3.1 (2024-03-17)

Fixed

  • fix: IOOB exception when arg count is invalid in SetDirectiveHandler (Akash Yadav)

v4.3.0

17 Mar 13:29
92c1b11
Compare
Choose a tag to compare

android-tree-sitter

v4.3.0 (2024-03-17)

Added

  • feat: add support for basic predicates (Akash Yadav)

v4.2.0

16 Mar 18:09
2a1931b
Compare
Choose a tag to compare

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

  • fix: implement object equality for model classes (Akash Yadav)

  • fix: memory leak in TSTree.getChangedRanges() (Akash Yadav)

v4.1.0

19 Feb 04:03
36bfd62
Compare
Choose a tag to compare

android-tree-sitter

v4.1.0 (2024-02-19)

This minor release updates the tree sitter library and adds the following grammars (published to maven central) :

  • properties
  • c
  • cpp

v4.0.1

04 Feb 10:43
000f9ce
Compare
Choose a tag to compare

android-tree-sitter

v4.0.1 (2024-02-04)

Fixed

  • fix(query): result from env->GetStringUTFChars is not released in TSQuery.Native.newQuery
  • fix: auto-register native method in JNI_OnLoad

Most of the native methods are now annotated with @FastNative.

v4.0.0

18 Nov 06:26
a0e3ea8
Compare
Choose a tag to compare

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.androidide to com.itsaky.androidide.treesitter.
  • New TSObjectFactory and TSObjectFactoryProvider APIs to allow usage of custom TS* 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 static create method 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 TSObjectFactory which would create custom TS* objects. This can be used to implement recyclable objects.
  • public fields in TS* classes are now protected and 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 IllegalArgumentException is thrown.
  • TSQueryCursor :
    • TSQueryCursor now checks whether a query has been executed when nextMatch and removeMatch are called. If not, it throws an IllegalStateException.
    • 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() returns true. This behavior can be changed with TSQueryCursor.setAllowChangedNodes(boolean).
    • Query cursors are now Iterable<TSQueryMatch>.
  • TSNode :
    • New APIs :
      • edit(TSInputEdit)
      • getNextParseState()
      • getDescendantCount()
      • getGrammarType()
      • getLanguage()
  • TSParser :
    • TSParser parse operation is now cancellable. You can request cancellation for the previous TSParser.parse(...) call with :
      • requestCancellationAsync : Request cancellation asynchronously.
      • requestCancellationAndWait : Requests cancellation and blocks the current thread until the parse is cancelled.
    • TSParser.parse(...) now throws a ParseInProgressException if a parse operation is already in progress. You can check whether a parser is parsing a syntax tree with TSParser.isParsing().

v3.4.0

26 Sep 16:09
ff070e8
Compare
Choose a tag to compare

android-tree-sitter

v3.4.0 (2023-09-26)

Added

  • feat: add TSLookaheadIterator (Akash Yadav)

  • feat: add state APIs in TSLanguage (Akash Yadav)

  • feat: add new APIs for TSTreeCursor (Akash Yadav)

  • feat: add support for ts_node_is_error and ts_node_parse_state (Akash Yadav)

Fixed

  • fix: set jvmTarget for KotlinCompile in :build-logic:ats (Akash Yadav)

  • fix(deps): update dependency org.mockito:mockito-core to v5.5.0 (#31) (renovate[bot])

  • fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v1.9.10 (#32) (renovate[bot])

v3.3.0

01 Aug 15:41
7421e2c
Compare
Choose a tag to compare

android-tree-sitter

v3.3.0 (2023-08-01)

Fixed

  • fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v1.9.0 (#21) (renovate[bot])

  • fix(deps): update dependency com.google.truth:truth to v1.1.5 (#22) (renovate[bot])

Added

  • feat(grammars): add grammar for 'aidl' and 'properties' file (Akash Yadav)

v3.2.0

22 Jun 07:07
1270f54
Compare
Choose a tag to compare

android-tree-sitter

v3.2.0 (2023-06-22)

Added

  • feat(query): add support for 'ts_query_capture_quantifier_for_id' (Akash Yadav)

v3.1.0

18 Jun 15:21
4162eed
Compare
Choose a tag to compare

android-tree-sitter

v3.1.0 (2023-06-18)

Fixed

  • fix: use custom Pair implementation (Akash Yadav)

  • fix: use language name and pointer to efficiently remove entries in TSLanguageCache.remove (Akash Yadav)

  • fix: add null checks in TSLanguageCache (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)

  • fix: add null check for new query instances (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: cache instances of TSLanguage for reuse (Akash Yadav)

  • feat: check access before accessing native objects (Akash Yadav)

  • feat: add support for loading external grammars (Akash Yadav)