Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: pkg/analyzer/lib/src/dart/error/syntactic_errors.dart

Issue 2411633002: Add `=` as default-value separator for named parameters. (Closed)
Patch Set: Add co19 issue number Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 5 /**
6 * The errors produced during sytactic analysis (scanning and parsing). 6 * The errors produced during sytactic analysis (scanning and parsing).
7 */ 7 */
8 library analyzer.src.dart.error.syntactic_errors; 8 library analyzer.src.dart.error.syntactic_errors;
9 9
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 const ParserErrorCode('UNEXPECTED_TOKEN', "Unexpected token '{0}'"); 607 const ParserErrorCode('UNEXPECTED_TOKEN', "Unexpected token '{0}'");
608 608
609 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode( 609 static const ParserErrorCode WITH_BEFORE_EXTENDS = const ParserErrorCode(
610 'WITH_BEFORE_EXTENDS', 610 'WITH_BEFORE_EXTENDS',
611 "The extends clause must be before the with clause"); 611 "The extends clause must be before the with clause");
612 612
613 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode( 613 static const ParserErrorCode WITH_WITHOUT_EXTENDS = const ParserErrorCode(
614 'WITH_WITHOUT_EXTENDS', 614 'WITH_WITHOUT_EXTENDS',
615 "The with clause cannot be used without an extends clause"); 615 "The with clause cannot be used without an extends clause");
616 616
617 static const ParserErrorCode WRONG_SEPARATOR_FOR_NAMED_PARAMETER =
618 const ParserErrorCode('WRONG_SEPARATOR_FOR_NAMED_PARAMETER',
619 "The default value of a named parameter should be preceeded by ':'");
620
621 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER = 617 static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
622 const ParserErrorCode('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER', 618 const ParserErrorCode('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
623 "The default value of a positional parameter should be preceeded by '= '"); 619 "The default value of a positional parameter should be preceeded by '= '");
624 620
625 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP = 621 static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP =
626 const ParserErrorCode('WRONG_TERMINATOR_FOR_PARAMETER_GROUP', 622 const ParserErrorCode('WRONG_TERMINATOR_FOR_PARAMETER_GROUP',
627 "Expected '{0}' to close parameter group"); 623 "Expected '{0}' to close parameter group");
628 624
629 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode( 625 static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode(
630 'VAR_AND_TYPE', 626 'VAR_AND_TYPE',
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 */ 698 */
703 const ScannerErrorCode(String name, String message, [String correction]) 699 const ScannerErrorCode(String name, String message, [String correction])
704 : super(name, message, correction); 700 : super(name, message, correction);
705 701
706 @override 702 @override
707 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 703 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
708 704
709 @override 705 @override
710 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 706 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
711 } 707 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698