Skip to content
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

Refactoring Query and QueryMatch #37

Merged
merged 33 commits into from
Oct 1, 2023
Merged

Refactoring Query and QueryMatch #37

merged 33 commits into from
Oct 1, 2023

Commits on Sep 28, 2023

  1. Pattern string used to construct a Query is split into substrings

    We essentially invoke the tree-sitter API at `build()` time to determine
    the starting offsets for each pattern of the full pattern string.
    dabico committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    458a0d4 View commit details
    Browse the repository at this point in the history
  2. Restoring the removed getPattern method

    The change of field signature caused this. We want to retain this method
    for backwards-compatibility purposes.
    dabico committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    2151802 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    131a10a View commit details
    Browse the repository at this point in the history
  4. Improved QueryTest

    dabico committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    1de5850 View commit details
    Browse the repository at this point in the history
  5. Deprecating redundant methods

    dabico committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    2e514e8 View commit details
    Browse the repository at this point in the history
  6. Creating a dedicated object for Query patterns: Pattern

    May see revisions in terms of structure
    dabico committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    2741761 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Configuration menu
    Copy the full SHA
    3f11c7d View commit details
    Browse the repository at this point in the history
  2. Creating a dedicated object for Query captures: Capture

    May see revisions in terms of structure
    dabico committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    2f04711 View commit details
    Browse the repository at this point in the history
  3. Renaming id to index in Capture and Pattern

    The first term is treated equivalently to the second by the tree-sitter
    library, but I feel like the new name makes more sense to the programmer
    as it reflects its true purpose
    dabico committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    1a448e3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    641f9f6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    75ba266 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5417f5c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2fac392 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    391a10e View commit details
    Browse the repository at this point in the history
  9. We no longer load the "captures" field from QueryMatch

    The type of said field will soon be changed, so this will quickly become
    an invalid reference. But apart from that, we don't use it anywhere, so
    it's not a loss at all.
    dabico committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    9247644 View commit details
    Browse the repository at this point in the history
  10. The Map and Entry inner class are loaded at JNI level

    I fell that we can use some sort of `Capture` -> `Node` map to replace
    the now-confusingly-named `QueryCapture` class. However, since one
    `Capture` instance will be able to map to multiple nodes, we will need
    to introduce some kind of multi-value variant of `Map` to store captures
    dabico committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    b30830b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    eba044e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4ea5c7f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e7a2ccf View commit details
    Browse the repository at this point in the history
  14. Deprecating QueryCapture

    dabico committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    a8670d9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1f6aea0 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2023

  1. Configuration menu
    Copy the full SHA
    80cac17 View commit details
    Browse the repository at this point in the history
  2. Upholding naming conventions

    dabico committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    fdf8dae View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    487aca1 View commit details
    Browse the repository at this point in the history
  4. Overriding equals and hashCode in Capture and Pattern

    Documentation is also updated to reflect this change
    dabico committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    e0e947a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1413167 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d77264b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b545411 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    16017ca View commit details
    Browse the repository at this point in the history
  9. Separating another test method

    The superclass will probably be renamed
    dabico committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    2231037 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    790c93c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    09a93ea View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b4be833 View commit details
    Browse the repository at this point in the history