Skip to content

Support Solidity by integrating solidity-parser-antlr #1754

Open

Description

@djmahe4

What problem does this solve?

Current indexing/parsing support does not cover Solidity files, so Solidity repositories can be skipped, partially indexed, or produce incomplete code graph/data. That makes the repository memory features much less useful for teams working with smart contracts.

Proposed solution

Add Solidity support by integrating solidity-parser-antlr into the parsing pipeline. Use it to parse Solidity source files, extract declarations/imports/references, and feed the resulting AST into indexing and search so Solidity projects are handled consistently with other supported languages. Include representative public OSS Solidity repos as test beds to validate coverage and parsing quality.

Alternatives considered

Alternative approaches could include extending a hand-rolled parser or relying on simpler regex-based extraction, but those would likely be less accurate and harder to maintain than using a dedicated Solidity parser.

Confirmations

  • I searched existing issues and this is not a duplicate.

Activity

  1. sanskar717 commented on Sep 3, 2026

    @sanskar717
    Contributor

    Happy to pick this up — quick check before I start: solidity-parser-antlr looks unmaintained (last updates years old), while @solidity-parser/parser is the actively maintained fork with the same AST shape. OK if I implement against the fork instead? Wanted to confirm before starting so I don't build on a dead dependency.

  2. added
    language-requestRequest for new language support
    priority/backlogValuable contribution, lower scheduling urgency; review when maintainer capacity opens.
    on Sep 3, 2026
  3. djmahe4 commented on Sep 7, 2026

    @djmahe4
    Author

    Actually I'm working on it in one of my forks and I can do one pr adding solidity as a single lang, but it would take a couple of weeks for me to do so.
    Meanwhile you can proceed with solidity-parser/parser

  4. sanskar717 commented on Sep 7, 2026

    @sanskar717
    Contributor

    @DeusData @djmahe4

    Opened a PR on the existing Tree-sitter Solidity path to address the missing modifier/decorator tracking.
    This keeps the current C-based architecture and does not introduce a Node.js runtime.
    The PR specifically adds modifier_invocation tracking so usages such as onlyOwner are included in the code graph.

    I can also proceed with the @solidity-parser/parser integration discussed above if the broader scope of #1754 is preferred.

  5. DeusData commented on Oct 25, 2026

    @DeusData
    Owner

    Thank you for separating Tree-sitter modifier tracking from the proposed parser integration. The broader dependency and contributor coordination need maintainer direction. Sorry for the delay; this is waiting on maintainer follow-up, and I’ll follow up soon.

  6. sanskar717 commented on Oct 26, 2026

    @sanskar717
    Contributor

    Thanks, @DeusData, no rush at all. I'll wait for the maintainer direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-requestRequest for new language supportparsing/qualityGraph extraction bugs, false positives, missing edgespriority/backlogValuable contribution, lower scheduling urgency; review when maintainer capacity opens.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions