@@ -73,11 +73,11 @@ void generateHeader(StringBuffer buffer) {
7373void generatePublicExtension (
7474 StringBuffer buffer, String nativeType, String dartType) {
7575 final storeTrunctateInt = """
76- /// Note that ints which do not fit in [ $nativeType ] are truncated.
76+ /// Note that ints which do not fit in ` $nativeType ` are truncated.
7777""" ;
7878
7979 final storeTrunctateDouble = """
80- /// Note that doubles stored into Pointer<[ Float] > lose precision.
80+ /// Note that doubles stored into Pointer<` Float` > lose precision.
8181""" ;
8282
8383 final storeTruncate =
@@ -89,35 +89,37 @@ void generatePublicExtension(
8989
9090 final loadSignExtend = isInt (nativeType) ? loadSignExtendInt : "" ;
9191
92+ // TODO(dartdoc-bug): Use [] instead of ``, once issue
93+ // https://github.com/dart-lang/dartdoc/issues/2039 is fixed.
9294 buffer.write ("""
9395/// Extension on [Pointer] specialized for the type argument [$nativeType ].
9496extension ${nativeType }Pointer on Pointer<$nativeType > {
9597 /// Load a Dart value from this location.
9698 ///
9799 /// The value is automatically unmarshalled from its native representation.
98100$loadSignExtend ///
99- /// Note that [ address] needs to be aligned to the size of [ $nativeType ] .
101+ /// Note that ` address` needs to be aligned to the size of ` $nativeType ` .
100102 external $dartType get value;
101103
102104 /// Store a Dart value into this location.
103105 ///
104- /// The [ value] is automatically marshalled into its native representation.
106+ /// The ` value` is automatically marshalled into its native representation.
105107$storeTruncate ///
106- /// Note that [ address] needs to be aligned to the size of [ $nativeType ] .
108+ /// Note that ` address` needs to be aligned to the size of ` $nativeType ` .
107109 external void set value($dartType value);
108110
109- /// Load a Dart value from this location offset by [ index] .
111+ /// Load a Dart value from this location offset by ` index` .
110112 ///
111113 /// The value is automatically unmarshalled from its native representation.
112114$loadSignExtend ///
113- /// Note that [ address] needs to be aligned to the size of [ $nativeType ] .
115+ /// Note that ` address` needs to be aligned to the size of ` $nativeType ` .
114116 external $dartType operator [](int index);
115117
116- /// Store a Dart value into this location offset by [ index] .
118+ /// Store a Dart value into this location offset by ` index` .
117119 ///
118- /// The [ value] is automatically marshalled into its native representation.
120+ /// The ` value` is automatically marshalled into its native representation.
119121$storeTruncate ///
120- /// Note that [ address] needs to be aligned to the size of [ $nativeType ] .
122+ /// Note that ` address` needs to be aligned to the size of ` $nativeType ` .
121123 external void operator []=(int index, $dartType value);
122124}
123125
0 commit comments