on master help sign in
Better syntax highlighting for Dart (#1959)

Remove unmaintained Dart syntax submodule. Add elMuso/Dartlight as submodule. Update Dart syntax highlighting. Add changes to changelog.

commit29711c178aac35e8a6a7eaf24d10be8e6dd008f4 authorErsikan <julien.philippon@epitech.eu> dateMon 6 Dec 2021, 08:40 (5 years ago) parent8072d5a
7 files changed+152−299
.gitmodules+3−3 CHANGELOG.md+1 assets/syntaxes/02_Extra/Dart+1−1 assets/syntaxes/02_Extra/Dart.sublime-syntax+85−243 tests/syntax-tests/highlighted/Dart/inner_comment.dart+5 tests/syntax-tests/highlighted/Dart/test.dart+52−52 tests/syntax-tests/source/Dart/inner_comment.dart+5
.gitmodules+3−3
@@ -67,9 +67,6 @@
6767[submodule "assets/syntaxes/JavaScript (Babel)"]
6868 path = assets/syntaxes/02_Extra/JavaScript (Babel)
6969 url = https://github.com/babel/babel-sublime
70−[submodule "assets/syntaxes/Dart"]
71− path = assets/syntaxes/02_Extra/Dart
72− url = https://github.com/guillermooo/dart-sublime-bundle
7370[submodule "assets/syntaxes/FSharp"]
7471 path = assets/syntaxes/02_Extra/FSharp
7572 url = https://github.com/hoest/sublimetext-fsharp
@@ -236,3 +233,6 @@
236233[submodule "assets/syntaxes/02_Extra/MediaWiki"]
237234 path = assets/syntaxes/02_Extra/MediaWiki
238235 url = https://github.com/tosher/Mediawiker.git
236+[submodule "assets/syntaxes/02_Extra/Dart"]
237+ path = assets/syntaxes/02_Extra/Dart
238+ url = https://github.com/elMuso/Dartlight.git
CHANGELOG.md+1
@@ -36,6 +36,7 @@
3636- LiveScript, see #1915 (@Enselic)
3737- MediaWiki, see #1925 (@sorairolake)
3838- The `requirements.txt` syntax has been removed due to incompatible license requirements.
39+- Dart, new highlighter, see #1959 (@Ersikan)
3940
4041## New themes
4142
assets/syntaxes/02_Extra/Dart+1−1

Submodule changed.

assets/syntaxes/02_Extra/Dart.sublime-syntax+85−243
@@ -1,6 +1,6 @@
11%YAML 1.2
22---
3−# http://www.sublimetext.com/docs/3/syntax.html
3+# http://www.sublimetext.com/docs/syntax.html
44name: Dart
55file_extensions:
66 - dart
@@ -9,7 +9,7 @@ contexts:
99 main:
1010 - match: ^(#!.*)$
1111 scope: meta.preprocessor.script.dart
12− - match: ^\s*\b(library|import|export|part of|part)\b
12+ - match: ^\w*\b(library|import|part of|part|export)\b
1313 captures:
1414 0: keyword.other.import.dart
1515 push:
@@ -19,242 +19,114 @@ contexts:
1919 0: punctuation.terminator.dart
2020 pop: true
2121 - include: strings
22− - match: \b(as|show|hide|deferred)\b
22+ - include: comments
23+ - match: \b(as|show|hide)\b
2324 scope: keyword.other.import.dart
2425 - include: comments
25− - include: constants-and-special-vars
26+ - include: punctuation
2627 - include: annotations
27− - include: decl-typedef
28− - include: decl-class
29− - include: decl-enum
30− - include: decl-function
3128 - include: keywords
29+ - include: constants-and-special-vars
3230 - include: strings
3331 annotations:
34− - match: '^(?:\s*)((@)([a-zA-Z0-9_]+))'
35− captures:
36− 1: annotation.dart
37− 2: entity.name.function.annotation.dart
38− 3: support.type.dart
32+ - match: '@[a-zA-Z]+'
33+ scope: storage.type.annotation.dart
3934 comments:
4035 - match: /\*\*/
4136 scope: comment.block.empty.dart
4237 captures:
4338 0: punctuation.definition.comment.dart
39+ - include: comments-doc-oldschool
40+ - include: comments-doc
4441 - include: comments-inline
45− comments-inline:
42+ comments-block:
4643 - match: /\*
4744 push:
4845 - meta_scope: comment.block.dart
4946 - match: \*/
5047 pop: true
51− - include: scope:text.dart-doccomments
52− - match: (///)
53− captures:
54− 1: marker.dart
48+ - include: comments-block
49+ comments-doc:
50+ - match: ///
5551 push:
56− - meta_scope: comment.line.triple-slash.dart
57− - match: $
52+ - meta_scope: comment.block.documentation.dart
53+ - match: .*
5854 pop: true
59− - include: scope:text.dart-doccomments
60− - match: (//)
61− captures:
62− 1: marker.dart
55+ - include: dartdoc
56+ comments-doc-oldschool:
57+ - match: /\*\*
6358 push:
64− - meta_scope: comment.line.double-slash.dart
65− - match: $
59+ - meta_scope: comment.block.documentation.dart
60+ - match: \*/
6661 pop: true
67− - include: scope:text.dart-doccomments
62+ - include: comments-doc-oldschool
63+ - include: comments-block
64+ - include: dartdoc
65+ comments-inline:
66+ - include: comments-block
67+ - match: ((//).*)$
68+ captures:
69+ 1: comment.line.double-slash.dart
6870 constants-and-special-vars:
69− - match: \b(true|false|null)\b
71+ - match: (?<!\$)\b(true|false|null)\b(?!\$)
7072 scope: constant.language.dart
71− - match: \b(this|super)\b
73+ - match: (?<!\$)\b(this|super)\b(?!\$)
7274 scope: variable.language.dart
73− - match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b'
75+ - match: '(?<!\$)\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b(?!\$)'
7476 scope: constant.numeric.dart
75− decl-class:
76− - match: \bclass\b
77+ - match: '(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*|bool\b|num\b|int\b|double\b|dynamic\b)'
78+ scope: support.class.dart
79+ - match: '([_$]*[a-z][a-zA-Z0-9_$]*)(<|\(|\s+=>)'
7780 captures:
78− 0: keyword.control.new.dart
79− push:
80− - meta_scope: meta.declaration.class.dart
81− - match: "(?={)"
82− pop: true
83− - include: keywords
84− - match: "[A-Za-z_][A-Za-z0-9_]*"
85− scope: class.name.dart
86− decl-enum:
87− - match: \benum\b
88− captures:
89− 0: keyword.declaration.dart
90− push:
91− - meta_scope: meta.declaration.enum.dart
92− - match: "(?={)"
93− pop: true
94− - include: keywords
95− - match: "[A-Za-z_][A-Za-z0-9_]*"
96− scope: enum.name.dart
97− decl-function:
98− - match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(get)\s+(\w+)\s+(?==>)
99− comment: A getter with a primitive return type.
100− scope: meta.declaration.function.dart
81+ 1: entity.name.function.dart
82+ dartdoc:
83+ - match: '(\[.*?\])'
10184 captures:
102− 1: storage.type.primitive.dart
103− 2: keyword.declaration.dart
104− 3: function.name.dart
105− - match: ^\s*(?:\b(\w+)\b\s+)?(get)\s+(\w+)\s+(?==>)
106− comment: A getter with a user-defined return type or no return type.
107− scope: meta.declaration.function.dart
108− captures:
109− 1: type.user-defined.dart
110− 2: keyword.declaration.dart
111− 3: function.name.dart
112− - match: ^\s*(set)\s+(\w+)(?=\()
113− comment: A setter.
114− captures:
115− 1: keyword.declaration.dart
116− 2: function.name.dart
117− push:
118− - meta_scope: meta.declaration.function.dart
119− - match: \)
120− pop: true
121− - include: comments-inline
122− - include: decl-function-parameter
123− - include: strings
124− - include: keywords
125− - match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
126− comment: A function with a primitive return type.
127− captures:
128− 1: storage.type.primitive.dart
129− 2: function.name.dart
130− push:
131− - meta_scope: meta.declaration.function.dart
132− - match: \)
133− pop: true
134− - include: comments-inline
135− - include: decl-function-parameter
136− - include: strings
137− - include: keywords
138− - match: ^\s*(?:\b(return)\b)\s+(\w+)(?=\()
139− comment: A function invocation after 'return'
140− captures:
141− 1: keyword.control.dart
142− 2: function.name.dart
143− push:
144− - meta_scope: meta.invocation.function.dart
145− - match: \)
146− pop: true
147− - include: comments-inline
148− - include: decl-function-parameter
149− - include: strings
150− - include: keywords
151− - match: ^\s*\b(new)\b\s+(\w+)(?=\()
152− comment: A class instantiation after 'new'
153− captures:
154− 1: keyword.declaration.dart
155− 2: function.name.dart
156− push:
157− - meta_scope: meta.invocation.function.dart
158− - match: \)
159− pop: true
160− - include: comments-inline
161− - include: decl-function-parameter
162− - include: strings
163− - include: keywords
164− decl-function-parameter:
165− - include: constants-and-special-vars
166− - match: (?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
167− comment: A function with a primitive return type.
168− captures:
169− 1: storage.type.primitive.dart
170− 2: function.name.dart
171− push:
172− - meta_scope: meta.parameter.function.dart
173− - match: \)
174− pop: true
175− - include: decl-function-parameter
176− - include: strings
177− - include: keywords
178− - match: \b(new)\b\s+(\w+)(?=\()
179− comment: A class instantiation after 'new'
85+ 0: variable.name.source.dart
86+ - match: '^ {4,}(?![ \*]).*'
18087 captures:
181− 1: keyword.declaration.dart
182− 2: function.name.dart
88+ 0: variable.name.source.dart
89+ - match: '```.*?$'
18390 push:
184− - meta_scope: meta.invocation.function.dart
185− - match: \)
91+ - meta_content_scope: variable.other.source.dart
92+ - match: '```'
18693 pop: true
187− - include: decl-function-parameter
188− - include: strings
189− - include: keywords
190− - match: (?:\b(\w+)\b)\s+(\w+)(?=\()
191− comment: A function with a user-defined return type.
94+ - match: (`.*?`)
19295 captures:
193− 1: type.user-defined.dart
194− 2: function.name.dart
195− push:
196− - meta_scope: meta.parameter.function.dart
197− - match: \)
198− pop: true
199− - include: decl-function-parameter
200− - include: strings
201− - include: keywords
202− - match: (\w+)(?=\()
203− comment: A function with no return type.
96+ 0: variable.other.source.dart
97+ - match: (`.*?`)
20498 captures:
205− 1: function.name.dart
206− push:
207− - meta_scope: meta.parameter.function.dart
208− - match: \)
209− pop: true
210− - include: decl-function-parameter
211− - include: strings
212− - include: keywords
213− decl-typedef:
214− - match: typedef
99+ 0: variable.other.source.dart
100+ - match: (\* (( ).*))$
215101 captures:
216− 0: keyword.control.new.dart
217− push:
218− - meta_scope: meta.declaration.typedef.dart
219− - match: ;
220− captures:
221− 0: punctuation.terminator.dart
222− pop: true
223− - match: '(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b|([a-zA-Z_][a-zA-Z0-9_]*))\s+([a-zA-Z_][a-zA-Z0-9_]+)'
224− captures:
225− 1: storage.type.primitive.dart
226− 2: typedef.return.dart
227− 3: typedef.name.dart
228− - match: \(
229− push:
230− - meta_scope: typedef.params.dart
231− - match: \)
232− pop: true
233− - include: keywords
102+ 2: variable.other.source.dart
103+ - match: (\* .*)$
234104 keywords:
235− - match: \bassert\b
236− scope: keyword.control.assert.dart
237− - match: \bas\b
105+ - match: (?<!\$)\bas\b(?!\$)
238106 scope: keyword.cast.dart
239− - match: \b(try|catch|finally|throw|on|rethrow)\b
107+ - match: (?<!\$)\b(try|on|catch|finally|throw|rethrow)\b(?!\$)
240108 scope: keyword.control.catch-exception.dart
241− - match: \s+\?\s+|\s+:\s+
242− scope: keyword.control.ternary.dart
243− - match: \b(break|case|continue|default|do|else|for|if|in|return|switch|while)\b
109+ - match: (?<!\$)\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\b(?!\$)
244110 scope: keyword.control.dart
245− - match: \b(async\*|async|await\*|await|yield)\b
246− scope: keyword.control.async.dart
247− - match: \b(new)\b
111+ - match: (?<!\$)\b(sync(\*)?|async(\*)?|await|yield(\*)?)\b(?!\$)
112+ scope: keyword.control.dart
113+ - match: (?<!\$)\bassert\b(?!\$)
114+ scope: keyword.control.dart
115+ - match: (?<!\$)\b(new)\b(?!\$)
248116 scope: keyword.control.new.dart
249− - match: \b(abstract|extends|external|factory|implements|with|interface|get|native|operator|set|typedef)\b
117+ - match: (?<!\$)\b(abstract|class|enum|extends|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\b(?!\$)
250118 scope: keyword.declaration.dart
251− - match: \b(is\!?)\b
119+ - match: (?<!\$)\b(is\!?)\b(?!\$)
252120 scope: keyword.operator.dart
121+ - match: '\?|:'
122+ scope: keyword.operator.ternary.dart
253123 - match: (<<|>>>?|~|\^|\||&)
254124 scope: keyword.operator.bitwise.dart
255125 - match: ((&|\^|\||<<|>>>?)=)
256126 scope: keyword.operator.assignment.bitwise.dart
257− - match: (===?|!==?|<=?|>=?)
127+ - match: (=>)
128+ scope: keyword.operator.closure.dart
129+ - match: (==|!=|<=?|>=?)
258130 scope: keyword.operator.comparison.dart
259131 - match: '(([+*/%-]|\~)=)'
260132 scope: keyword.operator.assignment.arithmetic.dart
@@ -266,56 +138,22 @@ contexts:
266138 scope: keyword.operator.arithmetic.dart
267139 - match: (!|&&|\|\|)
268140 scope: keyword.operator.logical.dart
269− - match: ;
270− scope: punctuation.terminator.dart
271− - match: \b(static|final|const)\b
141+ - match: (?<!\$)\b(static|final|const)\b(?!\$)
272142 scope: storage.modifier.dart
273− - match: \b(?:void|bool|num|int|double|dynamic|var|String|List|Map)\b
143+ - match: (?<!\$)\b(?:void|var)\b(?!\$)
274144 scope: storage.type.primitive.dart
275− regexp:
276− - match: '\\[^''"]'
277− scope: constant.character.escaped.regex.dart
278− - match: \(
279− push:
280− - meta_content_scope: meta.capture.regex.dart
281− - match: \)
282− pop: true
283− - match: \?(:|=|!)
284− scope: ignore.capture.regex.dart
285− - match: \*|\+|\?|\.|\|
286− scope: keyword.other.regex.dart
287− - match: \^|\$
288− scope: keyword.other.regex.dart
145+ punctuation:
146+ - match: ','
147+ scope: punctuation.comma.dart
148+ - match: ;
149+ scope: punctuation.terminator.dart
289150 - match: \.
290− scope: constant.other.regex.dart
291− - match: '\[(\^)?'
292− captures:
293− 1: keyword.other.negation.regex.dart
294− push:
295− - meta_scope: constant.character.range.regex.dart
296− - match: '\]'
297− pop: true
298− - match: '\\[^"'']'
299− scope: constant.character.escaped.regex.dart
300− - match: '\{(?:\d+)?,(?:\d+)?\}'
301− scope: keyword.other.regex.dart
151+ scope: punctuation.dot.dart
302152 string-interp:
303− - match: '(\$)(\{)'
153+ - match: '\$((\w+)|\{([^{}]+)\})'
304154 captures:
305− 1: keyword.other.dart
306− 2: keyword.other.dart
307− push:
308− - meta_scope: interpolation.dart
309− - meta_content_scope: source.dart
310− - match: '(\})'
311− captures:
312− 1: keyword.other.dart
313− pop: true
314− - include: main
315− - match: (\$)(\w+)
316− captures:
317− 1: keyword.other.dart
318155 2: variable.parameter.dart
156+ 3: variable.parameter.dart
319157 - match: \\.
320158 scope: constant.character.escape.dart
321159 strings:
@@ -328,7 +166,7 @@ contexts:
328166 - match: (?<!r)'''
329167 push:
330168 - meta_scope: string.interpolated.triple.single.dart
331− - match: "'''(?!')"
169+ - match: '''''''(?!'')'
332170 pop: true
333171 - include: string-interp
334172 - match: r"""
@@ -339,9 +177,9 @@ contexts:
339177 - match: r'''
340178 push:
341179 - meta_scope: string.quoted.triple.single.dart
342− - match: "'''(?!')"
180+ - match: '''''''(?!'')'
343181 pop: true
344− - match: (?<!\\|r)"
182+ - match: (?<!\|r)"
345183 push:
346184 - meta_scope: string.interpolated.double.dart
347185 - match: '"'
@@ -354,16 +192,20 @@ contexts:
354192 - meta_scope: string.quoted.double.dart
355193 - match: '"'
356194 pop: true
357− - include: regexp
195+ - match: \n
196+ scope: invalid.string.newline
358197 - match: (?<!\|r)'
359198 push:
360199 - meta_scope: string.interpolated.single.dart
361200 - match: "'"
362201 pop: true
202+ - match: \n
203+ scope: invalid.string.newline
363204 - include: string-interp
364205 - match: r'
365206 push:
366207 - meta_scope: string.quoted.single.dart
367208 - match: "'"
368209 pop: true
369− - include: regexp
210+ - match: \n
211+ scope: invalid.string.newline
tests/syntax-tests/highlighted/Dart/inner_comment.dartnew file+5
@@ -0,0 +1,5 @@
1+return Object(
2+ Object(
3+ // Not highlighted as a comment
4+ )
5+)
tests/syntax-tests/highlighted/Dart/test.dart+52−52
@@ -1,45 +1,45 @@
11/* array sorting alogorithm */
2−int partition(List list, int low, int high) {
3− if (list == null || list.length == 0) return 0;
4− int pivot = list[high];
5− int i = low - 1;
2+int partition(List list, int low, int high) {
3+ if (list == null || list.length == 0) return 0;
4+ int pivot = list[high];
5+ int i = low - 1;
66
7− void swap(List list, int i, int j) {
8− int temp = list[i];
7+ void swap(List list, int i, int j) {
8+ int temp = list[i];
99 list[i] = list[j];
1010 list[j] = temp;
1111 }
1212
13− for (int j = low; j < high; j++) {
13+ for (int j = low; j < high; j++) {
1414 if (list[j] <= pivot) {
1515 i++;
16− swap(list, i, j);
16+ swap(list, i, j);
1717 }
18− swap(list, i + 1, high);
18+ swap(list, i + 1, high);
1919 return i + 1;
2020 }
2121}
2222
23−void quickSort(List list, int low, int high) {
23+void quickSort(List list, int low, int high) {
2424 if (low < high) {
25− int pi = partition(list, low, high);
26− quickSort(list, low, pi - 1);
27− quickSort(list, pi + 1, high);
25+ int pi = partition(list, low, high);
26+ quickSort(list, low, pi - 1);
27+ quickSort(list, pi + 1, high);
2828 }
2929}
3030
31−void merge(List list, int leftIndex, int middleIndex, int rightIndex) {
32− int leftSize = middleIndex - leftIndex + 1;
33− int rightSize = rightIndex - middleIndex;
31+void merge(List list, int leftIndex, int middleIndex, int rightIndex) {
32+ int leftSize = middleIndex - leftIndex + 1;
33+ int rightSize = rightIndex - middleIndex;
3434
35− List leftList = new List(leftSize);
36− List rightList = new List(rightSize);
35+ List leftList = new List(leftSize);
36+ List rightList = new List(rightSize);
3737
38− for (int i = 0; i < leftSize; i++) leftList[i] = list[leftIndex + i];
39− for (int j = 0; j < rightSize; j++) rightList[j] = list[middleIndex + j + 1];
38+ for (int i = 0; i < leftSize; i++) leftList[i] = list[leftIndex + i];
39+ for (int j = 0; j < rightSize; j++) rightList[j] = list[middleIndex + j + 1];
4040
41− int i = 0, j = 0;
42− int k = leftIndex;
41+ int i = 0, j = 0;
42+ int k = leftIndex;
4343
4444 while (i < leftSize && j < rightSize) {
4545 if (leftList[i] <= rightList[j]) {
@@ -65,14 +65,14 @@
6565 }
6666}
6767
68−void mergeSort(List list, int leftIndex, int rightIndex) {
68+void mergeSort(List list, int leftIndex, int rightIndex) {
6969 if (leftIndex < rightIndex) {
70− int middleIndex = (rightIndex + leftIndex) ~/ 2;
70+ int middleIndex = (rightIndex + leftIndex) ~/ 2;
7171
72− mergeSort(list, leftIndex, middleIndex);
73− mergeSort(list, middleIndex + 1, rightIndex);
72+ mergeSort(list, leftIndex, middleIndex);
73+ mergeSort(list, middleIndex + 1, rightIndex);
7474
75− merge(list, leftIndex, middleIndex, rightIndex);
75+ merge(list, leftIndex, middleIndex, rightIndex);
7676 }
7777}
7878
@@ -80,54 +80,54 @@
8080var name = 'Voyager I';
8181var year = 1977;
8282var antennaDiameter = 3.7;
83−var flybyObjects = ['Jupiter', 'Saturn', 'Uranus', 'Neptune'];
83+var flybyObjects = ['Jupiter', 'Saturn', 'Uranus', 'Neptune'];
8484var image = {
85− 'tags': ['saturn'],
86− 'url': '//path/to/saturn.jpg'
85+ 'tags': ['saturn'],
86+ 'url': '//path/to/saturn.jpg'
8787};
8888
8989/*classes */
90−class Spacecraft {
91− String name;
92− DateTime launchDate;
93− Spacecraft(this.name, this.launchDate) {}
90+class Spacecraft {
91+ String name;
92+ DateTime launchDate;
93+ Spacecraft(this.name, this.launchDate) {}
9494
95− // Named constructor that forwards to the default one.
96− Spacecraft.unlaunched(String name) : this(name, null);
95+ // Named constructor that forwards to the default one.
96+ Spacecraft.unlaunched(String name) : this(name, null);
9797
98− int get launchYear => launchDate?.year;
98+ int get launchYear => launchDate?.year;
9999
100− void describe() {
101− print('Spacecraft: $name');
100+ void describe() {
101+ print('Spacecraft: $name');
102102 if (launchDate != null) {
103− int years = DateTime.now().difference(launchDate).inDays ~/ 365;
104− print('Launched: $launchYear ($years years ago)');
103+ int years = DateTime.now().difference(launchDate).inDays ~/ 365;
104+ print('Launched: $launchYear ($years years ago)');
105105 } else {
106− print('Unlaunched');
106+ print('Unlaunched');
107107 }
108108 }
109109}
110110
111111/* Mixins */
112−class PilotedCraft extends Spacecraft with Piloted {
113− // ···
112+class PilotedCraft extends Spacecraft with Piloted {
113+ // ···
114114}
115115
116116/* Interfaces and abstract classes */
117−class MockSpaceship implements Spacecraft {
118− // ···
117+class MockSpaceship implements Spacecraft {
118+ // ···
119119}
120120
121121/* async */
122−Future<void> printWithDelay(String message) {
123− return Future.delayed(const Duration(seconds: 2)).then((_) {
124− print(message);
122+Future<void> printWithDelay(String message) {
123+ return Future.delayed(const Duration(seconds: 2)).then((_) {
124+ print(message);
125125 });
126126}
127127
128−Stream<String> report(Spacecraft craft, Iterable<String> objects) async* {
128+Stream<String> report(Spacecraft craft, Iterable<String> objects) async* {
129129 for (var object in objects) {
130− await Future.delayed(const Duration(seconds: 2));
131− yield '${craft.name} flies by $object';
130+ await Future.delayed(const Duration(seconds: 2));
131+ yield '${craft.name} flies by $object';
132132 }
133133}
tests/syntax-tests/source/Dart/inner_comment.dartnew file+5
@@ -0,0 +1,5 @@
1+return Object(
2+ Object(
3+ // Not highlighted as a comment
4+ )
5+)