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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 1977413002: Improve type information and minor clean up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.dart.ast.utilities; 5 library analyzer.src.dart.ast.utilities;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 return list; 2310 return list;
2311 } 2311 }
2312 2312
2313 @override 2313 @override
2314 Object visitMapLiteral(MapLiteral node) { 2314 Object visitMapLiteral(MapLiteral node) {
2315 HashMap<String, Object> map = new HashMap<String, Object>(); 2315 HashMap<String, Object> map = new HashMap<String, Object>();
2316 for (MapLiteralEntry entry in node.entries) { 2316 for (MapLiteralEntry entry in node.entries) {
2317 Object key = entry.key.accept(this); 2317 Object key = entry.key.accept(this);
2318 Object value = entry.value.accept(this); 2318 Object value = entry.value.accept(this);
2319 if (key is String && !identical(value, NOT_A_CONSTANT)) { 2319 if (key is String && !identical(value, NOT_A_CONSTANT)) {
2320 map[(key as String)] = value; 2320 map[key] = value;
2321 } else { 2321 } else {
2322 return NOT_A_CONSTANT; 2322 return NOT_A_CONSTANT;
2323 } 2323 }
2324 } 2324 }
2325 return map; 2325 return map;
2326 } 2326 }
2327 2327
2328 @override 2328 @override
2329 Object visitMethodInvocation(MethodInvocation node) => visitNode(node); 2329 Object visitMethodInvocation(MethodInvocation node) => visitNode(node);
2330 2330
(...skipping 5455 matching lines...) Expand 10 before | Expand all | Expand 10 after
7786 * Safely visit the given [token], printing the [suffix] after the token if it 7786 * Safely visit the given [token], printing the [suffix] after the token if it
7787 * is non-`null`. 7787 * is non-`null`.
7788 */ 7788 */
7789 void _visitTokenWithSuffix(Token token, String suffix) { 7789 void _visitTokenWithSuffix(Token token, String suffix) {
7790 if (token != null) { 7790 if (token != null) {
7791 _writer.print(token.lexeme); 7791 _writer.print(token.lexeme);
7792 _writer.print(suffix); 7792 _writer.print(suffix);
7793 } 7793 }
7794 } 7794 }
7795 } 7795 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698