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 engine.parser; | 5 library engine.parser; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import "dart:math" as math; | 8 import "dart:math" as math; |
9 | 9 |
10 import 'ast.dart'; | 10 import 'ast.dart'; |
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 */ | 2180 */ |
2181 bool get hasReturnTypeInTypeAlias { | 2181 bool get hasReturnTypeInTypeAlias { |
2182 Token next = _skipReturnType(_currentToken); | 2182 Token next = _skipReturnType(_currentToken); |
2183 if (next == null) { | 2183 if (next == null) { |
2184 return false; | 2184 return false; |
2185 } | 2185 } |
2186 return _tokenMatchesIdentifier(next); | 2186 return _tokenMatchesIdentifier(next); |
2187 } | 2187 } |
2188 | 2188 |
2189 /** | 2189 /** |
2190 * Set whether the parser is to parse the async support. | |
2191 */ | |
2192 @deprecated | |
2193 void set parseAsync(bool parseAsync) { | |
2194 // Async support cannot be disabled | |
2195 } | |
2196 | |
2197 /** | |
2198 * Set whether the parser is to parse deferred libraries. | |
2199 */ | |
2200 @deprecated | |
2201 void set parseDeferredLibraries(bool parseDeferredLibraries) { | |
2202 // Deferred libraries support cannot be disabled | |
2203 } | |
2204 | |
2205 /** | |
2206 * Set whether the parser is to parse enum declarations. | |
2207 */ | |
2208 @deprecated | |
2209 void set parseEnum(bool parseEnum) { | |
2210 // Enum support cannot be disabled | |
2211 } | |
2212 | |
2213 /** | |
2214 * Set whether parser is to parse function bodies. | 2190 * Set whether parser is to parse function bodies. |
2215 */ | 2191 */ |
2216 void set parseFunctionBodies(bool parseFunctionBodies) { | 2192 void set parseFunctionBodies(bool parseFunctionBodies) { |
2217 this._parseFunctionBodies = parseFunctionBodies; | 2193 this._parseFunctionBodies = parseFunctionBodies; |
2218 } | 2194 } |
2219 | 2195 |
2220 /** | 2196 /** |
2221 * Advance to the next token in the token stream, making it the new current | 2197 * Advance to the next token in the token stream, making it the new current |
2222 * token and return the token that was current before this method was invoked. | 2198 * token and return the token that was current before this method was invoked. |
2223 */ | 2199 */ |
(...skipping 9086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11310 } | 11286 } |
11311 | 11287 |
11312 /** | 11288 /** |
11313 * Copy resolution data from the [fromNode] to the [toNode]. | 11289 * Copy resolution data from the [fromNode] to the [toNode]. |
11314 */ | 11290 */ |
11315 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 11291 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
11316 ResolutionCopier copier = new ResolutionCopier(); | 11292 ResolutionCopier copier = new ResolutionCopier(); |
11317 copier._isEqualNodes(fromNode, toNode); | 11293 copier._isEqualNodes(fromNode, toNode); |
11318 } | 11294 } |
11319 } | 11295 } |
OLD | NEW |