# Analyzer AST API Mapping (v10 -> v14)

The Dart `analyzer` package refactored its AST classes significantly.

| Concept (v10 / Legacy) | API (v14+ / Current) | Notes |
|---|---|---|
| `NamedExpression` | `NamedArgument` | Used to access named parameters in argument lists. |
| `.arguments` | `.arguments2` | Returns a `NodeList<Argument>` instead of a list of raw expressions. |
| `.expression` | `.argumentExpression2` | The actual expression of the argument. |
| `.label.name` (String) | `.name` (Token) | Use `.name.lexeme` to get the actual string value. |
| `Type.getDisplayString(withNullability: false)` | `.getDisplayString()` | The parameter is removed. |
| `DartType.isDartCoreDateTime` | Manual check via `InterfaceType(:final element)` | The convenience getter was removed. |

## Best Practices

- Always check the `pubspec.lock` of the project to confirm the exact `analyzer` version in use.
- Inspect source files under `/opt/data/home/.pub-cache/hosted/pub.dev/analyzer-<version>/lib/src/dart/ast/ast.dart` for the authoritative class definitions.
