@@ -83,9 +83,14 @@ Here, if `myCoolMacro` resolves to an instance of a class implementing one or
8383more of the macro interfaces, then the annotation is treated as an application
8484of the ` myCoolMacro ` macro to the class MyClass.
8585
86- ### Arguments
86+ Macro applications can also be passed arguments, either in the form of
87+ [ Code] [ ] expressions or certain types of literal values. See
88+ [ Macro Arguments] ( #Macro-arguments ) for more information on how these arguments
89+ are handled when executing macros.
8790
88- Macro applications can also be passed arguments. For example:
91+ ### Code Arguments
92+
93+ Consider this example macro application:
8994
9095``` dart
9196int get a => 1;
@@ -97,11 +102,11 @@ class SomeClass {
97102}
98103```
99104
100- Here, ` Add ` is a macro that takes its arguments and produces a function body
101- that adds them using ` + ` and returns the result.
105+ Here, ` Add ` is a macro that takes its arguments as expressions and produces a
106+ function body that adds them using ` + ` and returns the result.
102107
103108Because macros are applied at compile time, the arguments are passed to the
104- macro as objects representing unevaluated pieces of code . Here, the ` Add ` macro
109+ macro as objects representing unevaluated expressions . Here, the ` Add ` macro
105110receives objects that represent the * literal* ` 1 ` and * the expression* ` a + b ` .
106111It takes those and composes them into a function body like:
107112
0 commit comments