Skip to content

Commit

Permalink
Correct "experiment" grammar (#5819)
Browse files Browse the repository at this point in the history
Fixes #5817
  • Loading branch information
MaryaBelanger authored May 14, 2024
1 parent bccd657 commit 1d479ab
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/content/language/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This page covers each (at a high level, as ***the feature is still in preview***
in the following sections:

- [**The `JsonCodable` macro**](#the-jsoncodable-macro):
A ready-made macro you can try out today (behind an experiment flag)
A ready-made macro you can try out today (behind an experimental flag)
that offers a seamless solution to the
common issue of tedious JSON serialization and deserialization in Dart.

Expand All @@ -31,7 +31,7 @@ the feature is complete.
## The `JsonCodable` macro

:::important
The `JsonCodable` macro is not stable and currently behind an [experiment flag][].
The `JsonCodable` macro is not stable and currently behind an [experimental flag][].
It only works with Dart `3.5.0-152` or later.
This is available from the [Dart dev channel][channel]
or from the [Flutter master channel][flutter-channel].
Expand All @@ -44,7 +44,7 @@ user-defined Dart classes to JSON maps of type `Map<String, Object?>`.
It generates two members, a `toJson` serialization method,
and a `fromJson` deserialization constructor.

[experiment flag]: /tools/experiment-flags
[experimental flag]: /tools/experiment-flags
[`JsonCodable`]: {{site.pub-pkg}}/json/versions/0.20.0
[channel]: https://dart.dev/get-dart#release-channels
[flutter-channel]: {{site.flutter-docs}}/release/upgrade#other-channels
Expand Down Expand Up @@ -75,7 +75,7 @@ and a `fromJson` deserialization constructor.
import 'package:json/json.dart';
```

7. Run your project with the experiment flag:
7. Run your project with the experimental flag:

```console
dart run --enable-experiment=macros bin/my_app.dart
Expand Down Expand Up @@ -233,8 +233,9 @@ Some common examples that we hope to solve with macros in the future are:
### How macros work

:::important
The macros language feature is not stable and currently behind an [experiment flag][].
Functionality is highly subject to change. This section will remain very high-level until stable.
The macros language feature is not stable and currently behind an
[experimental flag][]. Functionality is highly subject to change.
This section will remain very high-level until stable.
:::

To create a macro, you write a macro declaration similar to a class,
Expand Down Expand Up @@ -275,7 +276,7 @@ properties. The macro gathers this information through deep [introspection][] of
the program.

Macros are still under development, so that's as much detail we can go into for now.
If you're curious, or would like to try it yourself behind an experiment flag,
If you're curious, or would like to try it yourself behind an experimental flag,
the best guidance is to take a look at the implementation of exisiting macros:

- Check out the [definition][json] of the `JsonCodable` macro,
Expand Down

0 comments on commit 1d479ab

Please sign in to comment.