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

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

Issue 2823993002: Issue 25558. Report an error, but don't crash when AST it too deep. (Closed)
Patch Set: Created 3 years, 8 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 syntactic analysis (scanning and parsing). 6 * The errors produced during syntactic 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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR', 827 'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
828 "Only factory constructor can specify '=' redirection.", 828 "Only factory constructor can specify '=' redirection.",
829 "Try making this a factory constructor, or " 829 "Try making this a factory constructor, or "
830 "not making this a redirecting constructor."); 830 "not making this a redirecting constructor.");
831 831
832 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode( 832 static const ParserErrorCode SETTER_IN_FUNCTION = const ParserErrorCode(
833 'SETTER_IN_FUNCTION', 833 'SETTER_IN_FUNCTION',
834 "Setters can't be defined within methods or functions.", 834 "Setters can't be defined within methods or functions.",
835 "Try moving the setter outside the method or function."); 835 "Try moving the setter outside the method or function.");
836 836
837 static const ParserErrorCode STACK_OVERFLOW = const ParserErrorCode(
838 'STACK_OVERFLOW',
839 "The file has too many nested expressions or statements.",
840 "Try simplifying the code.");
841
837 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode( 842 static const ParserErrorCode STATIC_AFTER_CONST = const ParserErrorCode(
838 'STATIC_AFTER_CONST', 843 'STATIC_AFTER_CONST',
839 "The modifier 'static' should be before the modifier 'const'.", 844 "The modifier 'static' should be before the modifier 'const'.",
840 "Try re-ordering the modifiers."); 845 "Try re-ordering the modifiers.");
841 846
842 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode( 847 static const ParserErrorCode STATIC_AFTER_FINAL = const ParserErrorCode(
843 'STATIC_AFTER_FINAL', 848 'STATIC_AFTER_FINAL',
844 "The modifier 'static' should be before the modifier 'final'.", 849 "The modifier 'static' should be before the modifier 'final'.",
845 "Try re-ordering the modifiers."); 850 "Try re-ordering the modifiers.");
846 851
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 */ 1002 */
998 const ParserErrorCode(String name, String message, [String correction]) 1003 const ParserErrorCode(String name, String message, [String correction])
999 : super(name, message, correction); 1004 : super(name, message, correction);
1000 1005
1001 @override 1006 @override
1002 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 1007 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
1003 1008
1004 @override 1009 @override
1005 ErrorType get type => ErrorType.SYNTACTIC_ERROR; 1010 ErrorType get type => ErrorType.SYNTACTIC_ERROR;
1006 } 1011 }
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