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

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

Issue 1642993003: Resynthesize untyped List / Map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 analyzer.src.generated.testing.ast_factory; 5 library analyzer.src.generated.testing.ast_factory;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/src/dart/ast/ast.dart'; 9 import 'package:analyzer/src/dart/ast/ast.dart';
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 entries, 793 entries,
794 TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET)); 794 TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
795 795
796 static MapLiteral mapLiteral2([List<MapLiteralEntry> entries]) => 796 static MapLiteral mapLiteral2([List<MapLiteralEntry> entries]) =>
797 mapLiteral(null, null, entries); 797 mapLiteral(null, null, entries);
798 798
799 static MapLiteralEntry mapLiteralEntry(String key, Expression value) => 799 static MapLiteralEntry mapLiteralEntry(String key, Expression value) =>
800 new MapLiteralEntry( 800 new MapLiteralEntry(
801 string2(key), TokenFactory.tokenFromType(TokenType.COLON), value); 801 string2(key), TokenFactory.tokenFromType(TokenType.COLON), value);
802 802
803 static MapLiteralEntry mapLiteralEntry2(Expression key, Expression value) =>
804 new MapLiteralEntry(
805 key, TokenFactory.tokenFromType(TokenType.COLON), value);
806
803 static MethodDeclaration methodDeclaration( 807 static MethodDeclaration methodDeclaration(
804 Keyword modifier, 808 Keyword modifier,
805 TypeName returnType, 809 TypeName returnType,
806 Keyword property, 810 Keyword property,
807 Keyword operator, 811 Keyword operator,
808 SimpleIdentifier name, 812 SimpleIdentifier name,
809 FormalParameterList parameters) => 813 FormalParameterList parameters) =>
810 new MethodDeclaration( 814 new MethodDeclaration(
811 null, 815 null,
812 null, 816 null,
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 expression, 1261 expression,
1258 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1262 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1259 1263
1260 static YieldStatement yieldStatement(Expression expression) => 1264 static YieldStatement yieldStatement(Expression expression) =>
1261 new YieldStatement( 1265 new YieldStatement(
1262 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), 1266 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"),
1263 null, 1267 null,
1264 expression, 1268 expression,
1265 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1269 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1266 } 1270 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698