| 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 7956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7967 * typeList ::= | 7967 * typeList ::= |
| 7968 * type (',' type)* | 7968 * type (',' type)* |
| 7969 */ | 7969 */ |
| 7970 Token _skipTypeArgumentList(Token startToken) { | 7970 Token _skipTypeArgumentList(Token startToken) { |
| 7971 Token token = startToken; | 7971 Token token = startToken; |
| 7972 if (!_tokenMatches(token, TokenType.LT)) { | 7972 if (!_tokenMatches(token, TokenType.LT)) { |
| 7973 return null; | 7973 return null; |
| 7974 } | 7974 } |
| 7975 token = _skipTypeName(token.next); | 7975 token = _skipTypeName(token.next); |
| 7976 if (token == null) { | 7976 if (token == null) { |
| 7977 // If the start token '<' is followed by '>' |
| 7978 // then assume this should be type argument list but is missing a type |
| 7979 token = startToken.next; |
| 7980 if (_tokenMatches(token, TokenType.GT)) { |
| 7981 return token.next; |
| 7982 } |
| 7977 return null; | 7983 return null; |
| 7978 } | 7984 } |
| 7979 while (_tokenMatches(token, TokenType.COMMA)) { | 7985 while (_tokenMatches(token, TokenType.COMMA)) { |
| 7980 token = _skipTypeName(token.next); | 7986 token = _skipTypeName(token.next); |
| 7981 if (token == null) { | 7987 if (token == null) { |
| 7982 return null; | 7988 return null; |
| 7983 } | 7989 } |
| 7984 } | 7990 } |
| 7985 if (token.type == TokenType.GT) { | 7991 if (token.type == TokenType.GT) { |
| 7986 return token.next; | 7992 return token.next; |
| (...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10531 } | 10537 } |
| 10532 | 10538 |
| 10533 /** | 10539 /** |
| 10534 * Copy resolution data from the [fromNode] to the [toNode]. | 10540 * Copy resolution data from the [fromNode] to the [toNode]. |
| 10535 */ | 10541 */ |
| 10536 static void copyResolutionData(AstNode fromNode, AstNode toNode) { | 10542 static void copyResolutionData(AstNode fromNode, AstNode toNode) { |
| 10537 ResolutionCopier copier = new ResolutionCopier(); | 10543 ResolutionCopier copier = new ResolutionCopier(); |
| 10538 copier._isEqualNodes(fromNode, toNode); | 10544 copier._isEqualNodes(fromNode, toNode); |
| 10539 } | 10545 } |
| 10540 } | 10546 } |
| OLD | NEW |