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.dart.ast.ast; | 5 library analyzer.src.dart.ast.ast; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 ..add(leftParenthesis) | 391 ..add(leftParenthesis) |
392 ..addAll(_arguments) | 392 ..addAll(_arguments) |
393 ..add(rightParenthesis); | 393 ..add(rightParenthesis); |
394 | 394 |
395 List<ParameterElement> get correspondingPropagatedParameters => | 395 List<ParameterElement> get correspondingPropagatedParameters => |
396 _correspondingPropagatedParameters; | 396 _correspondingPropagatedParameters; |
397 | 397 |
398 @override | 398 @override |
399 void set correspondingPropagatedParameters( | 399 void set correspondingPropagatedParameters( |
400 List<ParameterElement> parameters) { | 400 List<ParameterElement> parameters) { |
401 if (parameters.length != _arguments.length) { | 401 if (parameters != null && parameters.length != _arguments.length) { |
402 throw new IllegalArgumentException( | 402 throw new IllegalArgumentException( |
403 "Expected ${_arguments.length} parameters, not ${parameters.length}"); | 403 "Expected ${_arguments.length} parameters, not ${parameters.length}"); |
404 } | 404 } |
405 _correspondingPropagatedParameters = parameters; | 405 _correspondingPropagatedParameters = parameters; |
406 } | 406 } |
407 | 407 |
408 List<ParameterElement> get correspondingStaticParameters => | 408 List<ParameterElement> get correspondingStaticParameters => |
409 _correspondingStaticParameters; | 409 _correspondingStaticParameters; |
410 | 410 |
411 @override | 411 @override |
412 void set correspondingStaticParameters(List<ParameterElement> parameters) { | 412 void set correspondingStaticParameters(List<ParameterElement> parameters) { |
413 if (parameters.length != _arguments.length) { | 413 if (parameters != null && parameters.length != _arguments.length) { |
414 throw new IllegalArgumentException( | 414 throw new IllegalArgumentException( |
415 "Expected ${_arguments.length} parameters, not ${parameters.length}"); | 415 "Expected ${_arguments.length} parameters, not ${parameters.length}"); |
416 } | 416 } |
417 _correspondingStaticParameters = parameters; | 417 _correspondingStaticParameters = parameters; |
418 } | 418 } |
419 | 419 |
420 @override | 420 @override |
421 Token get endToken => rightParenthesis; | 421 Token get endToken => rightParenthesis; |
422 | 422 |
423 @override | 423 @override |
(...skipping 10619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11043 | 11043 |
11044 @override | 11044 @override |
11045 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => | 11045 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => |
11046 visitor.visitYieldStatement(this); | 11046 visitor.visitYieldStatement(this); |
11047 | 11047 |
11048 @override | 11048 @override |
11049 void visitChildren(AstVisitor visitor) { | 11049 void visitChildren(AstVisitor visitor) { |
11050 _expression?.accept(visitor); | 11050 _expression?.accept(visitor); |
11051 } | 11051 } |
11052 } | 11052 } |
OLD | NEW |