| 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'; |
| (...skipping 5706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5717 } | 5717 } |
| 5718 int depth = 1; | 5718 int depth = 1; |
| 5719 Token previous = startToken; | 5719 Token previous = startToken; |
| 5720 Token next = startToken.next; | 5720 Token next = startToken.next; |
| 5721 while (next != previous) { | 5721 while (next != previous) { |
| 5722 if (_tokenMatches(next, TokenType.LT)) { | 5722 if (_tokenMatches(next, TokenType.LT)) { |
| 5723 depth++; | 5723 depth++; |
| 5724 } else if (_tokenMatches(next, TokenType.GT)) { | 5724 } else if (_tokenMatches(next, TokenType.GT)) { |
| 5725 depth--; | 5725 depth--; |
| 5726 if (depth == 0) { | 5726 if (depth == 0) { |
| 5727 return next; | 5727 return next.next; |
| 5728 } | 5728 } |
| 5729 } | 5729 } |
| 5730 previous = next; | 5730 previous = next; |
| 5731 next = next.next; | 5731 next = next.next; |
| 5732 } | 5732 } |
| 5733 return null; | 5733 return null; |
| 5734 } | 5734 } |
| 5735 | 5735 |
| 5736 /** | 5736 /** |
| 5737 * Advance to the next token in the token stream. | 5737 * Advance to the next token in the token stream. |
| (...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8562 } | 8562 } |
| 8563 if (modifiers.finalKeyword != null) { | 8563 if (modifiers.finalKeyword != null) { |
| 8564 _reportErrorForToken( | 8564 _reportErrorForToken( |
| 8565 ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword); | 8565 ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword); |
| 8566 } | 8566 } |
| 8567 if (modifiers.varKeyword != null) { | 8567 if (modifiers.varKeyword != null) { |
| 8568 _reportErrorForToken(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword); | 8568 _reportErrorForToken(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword); |
| 8569 } | 8569 } |
| 8570 } | 8570 } |
| 8571 } | 8571 } |
| OLD | NEW |