Repository navigation
Add Kotlin syntax-aware file and symbol anchors - #43
Open
davidmoshal wants to merge 1 commit into
Open
davidmoshal wants to merge 1 commit into
davidmoshal wants to merge 1 commit into
Conversation
Include property accessors in symbol fingerprints and extraction. Add Kotlin fixtures, unit coverage and command-line regressions; wire the symbols tests into the test runner. Agent-Session: codex:01a0dfc2-f38e-7373-9a5d-4ddae6a60ae4
This file contains hidden or 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
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.
Summary
Add syntax-aware file fingerprints and symbol anchors for Kotlin source and script files (
.ktand.kts). The change pinsfwcd/tree-sitter-kotlin0.3.8 and follows the existing grammar/query registration pattern.Symbol queries cover classes, interfaces, objects, named companion objects, functions, properties, enum entries, and type aliases. Kotlin getters and setters can appear as siblings of their property in this grammar; include them in the property's fingerprint and extracted range without consuming the next declaration. Normalize inline versus newline accessor placement for property anchors.
Tests
src/symbols.zigfrom the test entrypoint so its tests actually run. Update its previously dormant file-reading test to use@embedFile, compatible with Zig 0.16 and without silently skipping files.zig build test -Doptimize=ReleaseSafe --summary all: 94/94 project tests passed; dependency test suites also passed.zig fmt --checkon all changed Zig files: passed.Limits
As with existing languages, symbol names are unqualified and use the first matching declaration. Constructor parameter properties, destructuring names, and unnamed companion objects are not independent symbol targets; enclosing declaration/file anchors remain available. Grammar limitations can change fingerprints when comment placement changes the parsed tree. These limits are documented in the README.