Skip to content

Add Dart parser support (.dart) #138

@josephismikhail

Description

@josephismikhail

Problem

Ix does not currently parse .dart files. Dart files are treated as unrecognized and excluded from analysis, meaning application logic, UI definitions, and business rules written in Dart are invisible to the system.

Proposed solution

Add a Dart parser that can identify and extract:

  • Class, mixin, and extension definitions
  • Function and method definitions
  • Import and export statements (e.g. import 'package:flutter/material.dart')
  • Variable and constant declarations (var, final, const)
  • Async/await patterns and Future/Stream usage
  • Annotations (e.g. @override, @required)
  • Null safety operators (e.g. ?, !, ??)

Support the following file patterns: *.dart

Why it matters

Dart is the language behind Flutter, which is increasingly used for cross-platform mobile, web, and desktop development. Without parsing Dart, Ix cannot reason about Flutter app structure, trace widget hierarchies, or understand how business logic is organized across a mobile codebase.

Merge requirements

Before this can be merged to main, the following must pass:

  • Tested on 3 repos
  • No regressions on existing parsers (ix map on a known TS/JS repo, verify counts unchanged)
  • Unit + smoke tests pass (npm test in ix-cli)
  • Class, mixin, and extension definitions ingested as entities
  • Functions and methods ingested and linked to their parent class
  • import and export statements resolved
  • var, final, and const declarations ingested
  • Annotations (@override, @required, etc.) preserved on their target entities
  • Async patterns (Future, Stream) visible on function signatures
  • CONTAINS chains correctly: class/mixin → method/field
  • ix text returns results with language: dart
  • ix contains returns members for a known Dart class

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions