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/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
11 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
12 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
13 import 'package:analyzer/exception/exception.dart'; | 13 import 'package:analyzer/exception/exception.dart'; |
14 import 'package:analyzer/src/dart/ast/token.dart'; | 14 import 'package:analyzer/src/dart/ast/token.dart'; |
15 import 'package:analyzer/src/dart/ast/utilities.dart'; | 15 import 'package:analyzer/src/dart/ast/utilities.dart'; |
16 import 'package:analyzer/src/dart/element/element.dart'; | 16 import 'package:analyzer/src/dart/element/element.dart'; |
17 import 'package:analyzer/src/dart/element/type.dart'; | 17 import 'package:analyzer/src/dart/element/type.dart'; |
18 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine; | 18 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine; |
| 19 import 'package:analyzer/src/generated/java_core.dart'; |
19 import 'package:analyzer/src/generated/java_engine.dart'; | 20 import 'package:analyzer/src/generated/java_engine.dart'; |
20 import 'package:analyzer/src/generated/parser.dart'; | 21 import 'package:analyzer/src/generated/parser.dart'; |
21 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; | 22 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; |
22 import 'package:analyzer/src/generated/utilities_dart.dart'; | 23 import 'package:analyzer/src/generated/utilities_dart.dart'; |
23 | 24 |
24 /** | 25 /** |
25 * 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 |
26 * adjacent (separated only by whitespace). | 27 * adjacent (separated only by whitespace). |
27 * | 28 * |
28 * 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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 } else { | 932 } else { |
932 if (_propertyMap == null) { | 933 if (_propertyMap == null) { |
933 _propertyMap = new HashMap<String, Object>(); | 934 _propertyMap = new HashMap<String, Object>(); |
934 } | 935 } |
935 _propertyMap[name] = value; | 936 _propertyMap[name] = value; |
936 } | 937 } |
937 } | 938 } |
938 | 939 |
939 @override | 940 @override |
940 String toSource() { | 941 String toSource() { |
941 StringBuffer buffer = new StringBuffer(); | 942 PrintStringWriter writer = new PrintStringWriter(); |
942 accept(new ToSourceVisitor(buffer)); | 943 accept(new ToSourceVisitor(writer)); |
943 return buffer.toString(); | 944 return writer.toString(); |
944 } | 945 } |
945 | 946 |
946 @override | 947 @override |
947 String toString() => toSource(); | 948 String toString() => toSource(); |
948 | 949 |
949 /** | 950 /** |
950 * Make this node the parent of the given [child] node. Return the child node. | 951 * Make this node the parent of the given [child] node. Return the child node. |
951 */ | 952 */ |
952 AstNode _becomeParentOf(AstNodeImpl child) { | 953 AstNode _becomeParentOf(AstNodeImpl child) { |
953 if (child != null) { | 954 if (child != null) { |
(...skipping 10093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11047 | 11048 |
11048 @override | 11049 @override |
11049 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 11050 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
11050 visitor.visitYieldStatement(this); | 11051 visitor.visitYieldStatement(this); |
11051 | 11052 |
11052 @override | 11053 @override |
11053 void visitChildren(AstVisitor visitor) { | 11054 void visitChildren(AstVisitor visitor) { |
11054 _expression?.accept(visitor); | 11055 _expression?.accept(visitor); |
11055 } | 11056 } |
11056 } | 11057 } |
OLD | NEW |