| OLD | NEW |
| 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.ast; | 5 library analyzer.src.dart.ast.ast; |
| 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/syntactic_entity.dart'; | 10 import 'package:analyzer/dart/ast/syntactic_entity.dart'; |
| 11 import 'package:analyzer/dart/ast/token.dart'; | 11 import 'package:analyzer/dart/ast/token.dart'; |
| 12 import 'package:analyzer/dart/element/element.dart'; | 12 import 'package:analyzer/dart/element/element.dart'; |
| 13 import 'package:analyzer/dart/element/type.dart'; | 13 import 'package:analyzer/dart/element/type.dart'; |
| 14 import 'package:analyzer/exception/exception.dart'; | 14 import 'package:analyzer/exception/exception.dart'; |
| 15 import 'package:analyzer/src/dart/ast/token.dart'; | 15 import 'package:analyzer/src/dart/ast/token.dart'; |
| 16 import 'package:analyzer/src/dart/ast/utilities.dart'; | 16 import 'package:analyzer/src/dart/ast/utilities.dart'; |
| 17 import 'package:analyzer/src/dart/element/element.dart'; | 17 import 'package:analyzer/src/dart/element/element.dart'; |
| 18 import 'package:analyzer/src/dart/element/type.dart'; | 18 import 'package:analyzer/src/dart/element/type.dart'; |
| 19 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine; | 19 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine; |
| 20 import 'package:analyzer/src/generated/java_core.dart'; | |
| 21 import 'package:analyzer/src/generated/java_engine.dart'; | 20 import 'package:analyzer/src/generated/java_engine.dart'; |
| 22 import 'package:analyzer/src/generated/parser.dart'; | 21 import 'package:analyzer/src/generated/parser.dart'; |
| 23 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; | 22 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; |
| 24 import 'package:analyzer/src/generated/utilities_dart.dart'; | 23 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 25 | 24 |
| 26 /** | 25 /** |
| 27 * Two or more string literals that are implicitly concatenated because of being | 26 * Two or more string literals that are implicitly concatenated because of being |
| 28 * adjacent (separated only by whitespace). | 27 * adjacent (separated only by whitespace). |
| 29 * | 28 * |
| 30 * While the grammar only allows adjacent strings when all of the strings are of | 29 * While the grammar only allows adjacent strings when all of the strings are of |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } else { | 933 } else { |
| 935 if (_propertyMap == null) { | 934 if (_propertyMap == null) { |
| 936 _propertyMap = new HashMap<String, Object>(); | 935 _propertyMap = new HashMap<String, Object>(); |
| 937 } | 936 } |
| 938 _propertyMap[name] = value; | 937 _propertyMap[name] = value; |
| 939 } | 938 } |
| 940 } | 939 } |
| 941 | 940 |
| 942 @override | 941 @override |
| 943 String toSource() { | 942 String toSource() { |
| 944 PrintStringWriter writer = new PrintStringWriter(); | 943 StringBuffer buffer = new StringBuffer(); |
| 945 accept(new ToSourceVisitor(writer)); | 944 accept(new ToSourceVisitor2(buffer)); |
| 946 return writer.toString(); | 945 return buffer.toString(); |
| 947 } | 946 } |
| 948 | 947 |
| 949 @override | 948 @override |
| 950 String toString() => toSource(); | 949 String toString() => toSource(); |
| 951 | 950 |
| 952 /** | 951 /** |
| 953 * Make this node the parent of the given [child] node. Return the child node. | 952 * Make this node the parent of the given [child] node. Return the child node. |
| 954 */ | 953 */ |
| 955 AstNode _becomeParentOf(AstNodeImpl child) { | 954 AstNode _becomeParentOf(AstNodeImpl child) { |
| 956 if (child != null) { | 955 if (child != null) { |
| (...skipping 10170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11127 | 11126 |
| 11128 @override | 11127 @override |
| 11129 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 11128 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
| 11130 visitor.visitYieldStatement(this); | 11129 visitor.visitYieldStatement(this); |
| 11131 | 11130 |
| 11132 @override | 11131 @override |
| 11133 void visitChildren(AstVisitor visitor) { | 11132 void visitChildren(AstVisitor visitor) { |
| 11134 _expression?.accept(visitor); | 11133 _expression?.accept(visitor); |
| 11135 } | 11134 } |
| 11136 } | 11135 } |
| OLD | NEW |