Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: pkg/analyzer/lib/src/generated/testing/ast_factory.dart

Issue 1376473007: Add the 'docRange' property and use it to compute documentation comment. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library engine.testing.ast_factory; 5 library engine.testing.ast_factory;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/scanner.dart'; 9 import 'package:analyzer/src/generated/scanner.dart';
10 import 'package:analyzer/src/generated/testing/token_factory.dart'; 10 import 'package:analyzer/src/generated/testing/token_factory.dart';
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 type, 370 type,
371 identifier3(identifier)); 371 identifier3(identifier));
372 372
373 static DeclaredIdentifier declaredIdentifier3(String identifier) => 373 static DeclaredIdentifier declaredIdentifier3(String identifier) =>
374 declaredIdentifier2(Keyword.VAR, null, identifier); 374 declaredIdentifier2(Keyword.VAR, null, identifier);
375 375
376 static DeclaredIdentifier declaredIdentifier4( 376 static DeclaredIdentifier declaredIdentifier4(
377 TypeName type, String identifier) => 377 TypeName type, String identifier) =>
378 declaredIdentifier2(null, type, identifier); 378 declaredIdentifier2(null, type, identifier);
379 379
380 static Comment documentationComment(
381 List<Token> tokens, List<CommentReference> references) {
382 return new Comment(tokens, CommentType.DOCUMENTATION, references);
383 }
384
380 static DoStatement doStatement(Statement body, Expression condition) => 385 static DoStatement doStatement(Statement body, Expression condition) =>
381 new DoStatement( 386 new DoStatement(
382 TokenFactory.tokenFromKeyword(Keyword.DO), 387 TokenFactory.tokenFromKeyword(Keyword.DO),
383 body, 388 body,
384 TokenFactory.tokenFromKeyword(Keyword.WHILE), 389 TokenFactory.tokenFromKeyword(Keyword.WHILE),
385 TokenFactory.tokenFromType(TokenType.OPEN_PAREN), 390 TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
386 condition, 391 condition,
387 TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), 392 TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
388 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 393 TokenFactory.tokenFromType(TokenType.SEMICOLON));
389 394
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 expression, 1251 expression,
1247 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1252 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1248 1253
1249 static YieldStatement yieldStatement(Expression expression) => 1254 static YieldStatement yieldStatement(Expression expression) =>
1250 new YieldStatement( 1255 new YieldStatement(
1251 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), 1256 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"),
1252 null, 1257 null,
1253 expression, 1258 expression,
1254 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1259 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1255 } 1260 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698