| 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.generated.parser; | 5 library analyzer.src.generated.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 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| 11 import 'package:analyzer/dart/ast/visitor.dart'; | 11 import 'package:analyzer/dart/ast/visitor.dart'; |
| 12 import 'package:analyzer/src/dart/ast/ast.dart'; | 12 import 'package:analyzer/src/dart/ast/ast.dart'; |
| 13 import 'package:analyzer/src/dart/ast/utilities.dart'; | 13 import 'package:analyzer/src/dart/ast/utilities.dart'; |
| 14 import 'package:analyzer/src/generated/engine.dart' | 14 import 'package:analyzer/src/generated/engine.dart' |
| 15 show AnalysisEngine, AnalysisOptionsImpl; | 15 show AnalysisEngine, AnalysisOptionsImpl; |
| 16 import 'package:analyzer/src/generated/error.dart'; | 16 import 'package:analyzer/src/generated/error.dart'; |
| 17 import 'package:analyzer/src/generated/generated/shared_messages.dart' |
| 18 as shared_messages; |
| 17 import 'package:analyzer/src/generated/java_core.dart'; | 19 import 'package:analyzer/src/generated/java_core.dart'; |
| 18 import 'package:analyzer/src/generated/java_engine.dart'; | 20 import 'package:analyzer/src/generated/java_engine.dart'; |
| 19 import 'package:analyzer/src/generated/scanner.dart'; | 21 import 'package:analyzer/src/generated/scanner.dart'; |
| 20 import 'package:analyzer/src/generated/source.dart'; | 22 import 'package:analyzer/src/generated/source.dart'; |
| 21 import 'package:analyzer/src/generated/utilities_collection.dart' show TokenMap; | 23 import 'package:analyzer/src/generated/utilities_collection.dart' show TokenMap; |
| 22 import 'package:analyzer/src/generated/utilities_dart.dart'; | 24 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 23 | 25 |
| 24 Map<String, MethodTrampoline> methodTable_Parser = <String, MethodTrampoline>{ | 26 Map<String, MethodTrampoline> methodTable_Parser = <String, MethodTrampoline>{ |
| 25 'parseCompilationUnit_1': new MethodTrampoline( | 27 'parseCompilationUnit_1': new MethodTrampoline( |
| 26 1, (Parser target, arg0) => target.parseCompilationUnit(arg0)), | 28 1, (Parser target, arg0) => target.parseCompilationUnit(arg0)), |
| (...skipping 9376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9403 "Members cannot be declared to be both 'const' and 'final'"); | 9405 "Members cannot be declared to be both 'const' and 'final'"); |
| 9404 | 9406 |
| 9405 static const ParserErrorCode CONST_AND_VAR = const ParserErrorCode( | 9407 static const ParserErrorCode CONST_AND_VAR = const ParserErrorCode( |
| 9406 'CONST_AND_VAR', | 9408 'CONST_AND_VAR', |
| 9407 "Members cannot be declared to be both 'const' and 'var'"); | 9409 "Members cannot be declared to be both 'const' and 'var'"); |
| 9408 | 9410 |
| 9409 static const ParserErrorCode CONST_CLASS = const ParserErrorCode( | 9411 static const ParserErrorCode CONST_CLASS = const ParserErrorCode( |
| 9410 'CONST_CLASS', "Classes cannot be declared to be 'const'"); | 9412 'CONST_CLASS', "Classes cannot be declared to be 'const'"); |
| 9411 | 9413 |
| 9412 static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = | 9414 static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = |
| 9413 const ParserErrorCode('CONST_CONSTRUCTOR_WITH_BODY', | 9415 shared_messages.CONST_CONSTRUCTOR_WITH_BODY; |
| 9414 "'const' constructors cannot have a body"); | |
| 9415 | 9416 |
| 9416 static const ParserErrorCode CONST_ENUM = const ParserErrorCode( | 9417 static const ParserErrorCode CONST_ENUM = const ParserErrorCode( |
| 9417 'CONST_ENUM', "Enums cannot be declared to be 'const'"); | 9418 'CONST_ENUM', "Enums cannot be declared to be 'const'"); |
| 9418 | 9419 |
| 9419 static const ParserErrorCode CONST_FACTORY = const ParserErrorCode( | 9420 static const ParserErrorCode CONST_FACTORY = |
| 9420 'CONST_FACTORY', | 9421 shared_messages.CONST_FACTORY; |
| 9421 "Only redirecting factory constructors can be declared to be 'const'"); | |
| 9422 | 9422 |
| 9423 static const ParserErrorCode CONST_METHOD = const ParserErrorCode( | 9423 static const ParserErrorCode CONST_METHOD = const ParserErrorCode( |
| 9424 'CONST_METHOD', | 9424 'CONST_METHOD', |
| 9425 "Getters, setters and methods cannot be declared to be 'const'"); | 9425 "Getters, setters and methods cannot be declared to be 'const'"); |
| 9426 | 9426 |
| 9427 static const ParserErrorCode CONST_TYPEDEF = const ParserErrorCode( | 9427 static const ParserErrorCode CONST_TYPEDEF = const ParserErrorCode( |
| 9428 'CONST_TYPEDEF', "Type aliases cannot be declared to be 'const'"); | 9428 'CONST_TYPEDEF', "Type aliases cannot be declared to be 'const'"); |
| 9429 | 9429 |
| 9430 static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = | 9430 static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE = |
| 9431 const ParserErrorCode('CONSTRUCTOR_WITH_RETURN_TYPE', | 9431 const ParserErrorCode('CONSTRUCTOR_WITH_RETURN_TYPE', |
| (...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11359 } | 11359 } |
| 11360 | 11360 |
| 11361 /** | 11361 /** |
| 11362 * Copy resolution data from the [fromNode] to the [toNode]. | 11362 * Copy resolution data from the [fromNode] to the [toNode]. |
| 11363 */ | 11363 */ |
| 11364 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 11364 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
| 11365 ResolutionCopier copier = new ResolutionCopier(); | 11365 ResolutionCopier copier = new ResolutionCopier(); |
| 11366 copier._isEqualNodes(fromNode, toNode); | 11366 copier._isEqualNodes(fromNode, toNode); |
| 11367 } | 11367 } |
| 11368 } | 11368 } |
| OLD | NEW |