| 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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 */ | 2182 */ |
| 2183 bool parseGenericMethods = false; | 2183 bool parseGenericMethods = false; |
| 2184 | 2184 |
| 2185 /** | 2185 /** |
| 2186 * A flag indicating whether to parse generic method comments, of the form | 2186 * A flag indicating whether to parse generic method comments, of the form |
| 2187 * `/*=T*/` and `/*<T>*/`. | 2187 * `/*=T*/` and `/*<T>*/`. |
| 2188 */ | 2188 */ |
| 2189 bool parseGenericMethodComments = false; | 2189 bool parseGenericMethodComments = false; |
| 2190 | 2190 |
| 2191 /** | 2191 /** |
| 2192 * A flag indicating whether the parser is to parse trailing commas in |
| 2193 * parameter and argument lists (sdk#26647). |
| 2194 */ |
| 2195 bool parseTrailingCommas = false; |
| 2196 |
| 2197 /** |
| 2192 * Initialize a newly created parser to parse tokens in the given [_source] | 2198 * Initialize a newly created parser to parse tokens in the given [_source] |
| 2193 * and to report any errors that are found to the given [_errorListener]. | 2199 * and to report any errors that are found to the given [_errorListener]. |
| 2194 */ | 2200 */ |
| 2195 Parser(this._source, this._errorListener); | 2201 Parser(this._source, this._errorListener); |
| 2196 | 2202 |
| 2197 /** | 2203 /** |
| 2198 * Set the token with which the parse is to begin to the given [token]. | 2204 * Set the token with which the parse is to begin to the given [token]. |
| 2199 */ | 2205 */ |
| 2200 void set currentToken(Token token) { | 2206 void set currentToken(Token token) { |
| 2201 this._currentToken = token; | 2207 this._currentToken = token; |
| (...skipping 8252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10454 */ | 10460 */ |
| 10455 const ParserErrorCode(String name, String message, [String correction]) | 10461 const ParserErrorCode(String name, String message, [String correction]) |
| 10456 : super(name, message, correction); | 10462 : super(name, message, correction); |
| 10457 | 10463 |
| 10458 @override | 10464 @override |
| 10459 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; | 10465 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; |
| 10460 | 10466 |
| 10461 @override | 10467 @override |
| 10462 ErrorType get type => ErrorType.SYNTACTIC_ERROR; | 10468 ErrorType get type => ErrorType.SYNTACTIC_ERROR; |
| 10463 } | 10469 } |
| OLD | NEW |