You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Dart implementation executes macros, it invokes these visit methods at
328
-
the appropriate phase for the declarations the macro is applied to. Each visit
323
+
When a Dart implementation executes macros, it invokes these builder methods at
324
+
the appropriate phase for the declarations the macro is applied to. Each builder
329
325
method is passed two arguments which give the macro the context and capabilities
330
-
it needs to introspect over the program and generate code:
331
-
332
-
### Introspection argument
326
+
it needs to introspect over the program and generate code.
333
327
334
-
The first argument to a visit method is an object that lets the macro introspect over the declaration that the macro is applied to. The type of this argument
335
-
varies for each macro interface. Each kind of declaration has unique properties
336
-
and the phases each have different introspective power.
328
+
### Declaration argument
337
329
338
-
For example, in [ClassDeclarationMacro][], the introspection object is a
339
-
[ClassDeclaration][]. That object gives you access to the name of the class,
340
-
its supertypes, members, etc.
330
+
The first argument to a builder method is an object describing the
331
+
declaration it is applied to. This argument contains only essentially the parsed
332
+
AST for the declaration itself, and does not include nested declarations.
0 commit comments