| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.parser; | 8 library engine.parser; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2685 CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata(); | 2685 CommentAndMetadata commentAndMetadata = _parseCommentAndMetadata(); |
| 2686 if ((_matchesKeyword(Keyword.IMPORT) || | 2686 if ((_matchesKeyword(Keyword.IMPORT) || |
| 2687 _matchesKeyword(Keyword.EXPORT) || | 2687 _matchesKeyword(Keyword.EXPORT) || |
| 2688 _matchesKeyword(Keyword.LIBRARY) || | 2688 _matchesKeyword(Keyword.LIBRARY) || |
| 2689 _matchesKeyword(Keyword.PART)) && | 2689 _matchesKeyword(Keyword.PART)) && |
| 2690 !_tokenMatches(_peek(), TokenType.PERIOD) && | 2690 !_tokenMatches(_peek(), TokenType.PERIOD) && |
| 2691 !_tokenMatches(_peek(), TokenType.LT) && | 2691 !_tokenMatches(_peek(), TokenType.LT) && |
| 2692 !_tokenMatches(_peek(), TokenType.OPEN_PAREN)) { | 2692 !_tokenMatches(_peek(), TokenType.OPEN_PAREN)) { |
| 2693 Directive directive = _parseDirective(commentAndMetadata); | 2693 Directive directive = _parseDirective(commentAndMetadata); |
| 2694 if (declarations.length > 0 && !directiveFoundAfterDeclaration) { | 2694 if (declarations.length > 0 && !directiveFoundAfterDeclaration) { |
| 2695 _reportErrorForCurrentToken( | 2695 _reportErrorForToken( |
| 2696 ParserErrorCode.DIRECTIVE_AFTER_DECLARATION); | 2696 ParserErrorCode.DIRECTIVE_AFTER_DECLARATION, directive.beginToken)
; |
| 2697 directiveFoundAfterDeclaration = true; | 2697 directiveFoundAfterDeclaration = true; |
| 2698 } | 2698 } |
| 2699 if (directive is LibraryDirective) { | 2699 if (directive is LibraryDirective) { |
| 2700 if (libraryDirectiveFound) { | 2700 if (libraryDirectiveFound) { |
| 2701 _reportErrorForCurrentToken( | 2701 _reportErrorForCurrentToken( |
| 2702 ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES); | 2702 ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES); |
| 2703 } else { | 2703 } else { |
| 2704 if (directives.length > 0) { | 2704 if (directives.length > 0) { |
| 2705 _reportErrorForToken(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, | 2705 _reportErrorForToken(ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST, |
| 2706 directive.libraryKeyword); | 2706 directive.libraryKeyword); |
| (...skipping 8440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11147 * Copy resolution data from one node to another. | 11147 * Copy resolution data from one node to another. |
| 11148 * | 11148 * |
| 11149 * @param fromNode the node from which resolution information will be copied | 11149 * @param fromNode the node from which resolution information will be copied |
| 11150 * @param toNode the node to which resolution information will be copied | 11150 * @param toNode the node to which resolution information will be copied |
| 11151 */ | 11151 */ |
| 11152 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 11152 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
| 11153 ResolutionCopier copier = new ResolutionCopier(); | 11153 ResolutionCopier copier = new ResolutionCopier(); |
| 11154 copier._isEqualNodes(fromNode, toNode); | 11154 copier._isEqualNodes(fromNode, toNode); |
| 11155 } | 11155 } |
| 11156 } | 11156 } |
| OLD | NEW |