Files
Kazuki Yamada d10814163d fix(core): Cover const and external constructors in Dart query
Three constructor variants were silently dropped during --compress:

- `const Foo(...);` and `const Foo.named(...) : ...;` parse as
  `(declaration (constant_constructor_signature ...))` — a node type the
  existing constructor query did not list.
- `const factory Foo() = Bar;` parses as
  `(redirecting_factory_constructor_signature (const_builtin) (identifier) ...)`
  whose first named child is `const_builtin`, so the leading-anchor
  `. (identifier)` pattern failed to match.
- `external factory Foo.make();` parses as
  `(declaration (factory_constructor_signature ...))` — bare under
  `declaration`, not wrapped in `method_signature`, so the existing
  factory query missed it.

Switch the constructor / factory / redirecting-factory queries to
capture the whole signature node as `@name.definition.method`. This
emits the same source line(s) DefaultParseStrategy already produces and
is robust across all body / external / const / redirecting variants.
2026-05-06 22:12:39 +09:00
..