@@ -24,8 +24,8 @@ Why we're adding macros to Dart, motivating use cases,
24
24
benefits over existing code gen solutions,
25
25
and a cursory overview of how writing macros works.
26
26
27
- [ spec ] : https://github.com/ dart- lang/language /blob/main/working/macros/feature-specification.md
28
- [ motivation ] : https://github.com/ dart- lang/language/blob/main/working/macros/motivation.md
27
+ [ spec ] : {{site.repo. dart. lang}} /blob/main/working/macros/feature-specification.md
28
+ [ motivation ] : {{site.repo. dart. lang}} /language/blob/main/working/macros/motivation.md
29
29
30
30
## The ` JsonCodable ` macro
31
31
@@ -40,7 +40,7 @@ It generates two members, a `toJson` serialization method,
40
40
and a ` fromJson ` deserialization constructor.
41
41
42
42
[ experiment flag ] : /tools/experiment-flags
43
- [ `JsonCodable` ] : https://github.com/ dart-lang/ sdk/tree/main/pkg/json
43
+ [ `JsonCodable` ] : {{site.repo. dart. sdk}} /tree/main/pkg/json
44
44
45
45
### Set up the experiment
46
46
@@ -137,7 +137,7 @@ You can search "`DiagnosticMessage`" in the [the definition of `JsonCodable`][js
137
137
for other errors the macro will throw. For example, extending a class that isn't
138
138
also serializable, or if field names don't exactly match the key names in the given JSON.
139
139
140
- [ the definition of `JsonCodable` ] : https://github.com/ dart-lang/ sdk/blob/master/pkg/json/lib/json.dart
140
+ [ the definition of `JsonCodable` ] : {{site.repo. dart. sdk}} /blob/master/pkg/json/lib/json.dart
141
141
142
142
## The macros language feature
143
143
@@ -197,8 +197,8 @@ Some common examples are:
197
197
complex ` build ` method to generates smaller widget classes,
198
198
greatly improving productivity and quality of Flutter code.
199
199
200
- [ json_serializable ] : https://pub.dev/packages /json_serializable
201
- [ most requested ] : https://github.com/ dart- lang/language /issues/314
200
+ [ json_serializable ] : {{site.pub-pkg}} /json_serializable
201
+ [ most requested ] : {{site.repo. dart. lang}} /issues/314
202
202
203
203
### How macros work
204
204
@@ -252,10 +252,10 @@ the best guidance is to take a look at the implementation of exisiting macros:
252
252
- Check out the [ definition] [ json ] of the ` JsonCodable ` macro,
253
253
- Or any of the [ examples] [ ] available in the language repo.
254
254
255
- [ types ] : https://github.com/ dart-lang/ sdk/blob/main/pkg/_macros/lib/src/api/macros.dart
256
- [ json ] : https://github.com/ dart-lang/ sdk/blob/master/pkg/json/lib/json.dart
257
- [ augmentation ] : https://github.com/ dart- lang/language /blob/main/working/augmentation-libraries/feature-specification.md
258
- [ examples ] : https://github.com/ dart- lang/language /tree/main/working/macros/example
255
+ [ types ] : {{site.repo. dart. sdk}} /blob/main/pkg/_macros/lib/src/api/macros.dart
256
+ [ json ] : {{site.repo. dart. sdk}} /blob/master/pkg/json/lib/json.dart
257
+ [ augmentation ] : {{site.repo. dart. lang}} /blob/main/working/augmentation-libraries/feature-specification.md
258
+ [ examples ] : {{site.repo. dart. lang}} /tree/main/working/macros/example
259
259
260
260
## Timeline
261
261
@@ -276,6 +276,6 @@ We are working towards a stable release of the [`JsonCodable`][] macro
276
276
later this year (2024), and a stable release of the full language feature
277
277
(namely, writing your own macros) early next year (2025).
278
278
279
- [ introspection ] : https://github.com/ dart- lang/language /blob/main/working/macros/feature-specification.md#introspection
280
- [ ordering ] : https://github.com/ dart- lang/language /blob/main/working/macros/feature-specification.md#ordering-in-metaprogramming
281
- [ phases ] : https://github.com/ dart- lang/language /blob/main/working/macros/feature-specification.md#phases
279
+ [ introspection ] : {{site.repo. dart. lang}} /blob/main/working/macros/feature-specification.md#introspection
280
+ [ ordering ] : {{site.repo. dart. lang}} /blob/main/working/macros/feature-specification.md#ordering-in-metaprogramming
281
+ [ phases ] : {{site.repo. dart. lang}} /blob/main/working/macros/feature-specification.md#phases
0 commit comments