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

Side by Side Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 messages in this file should meet the following guide lines: 6 * The messages in this file should meet the following guide lines:
7 * 7 *
8 * 1. The message should be a complete sentence starting with an uppercase 8 * 1. The message should be a complete sentence starting with an uppercase
9 * letter, and ending with a period. 9 * letter, and ending with a period.
10 * 10 *
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 examples: const [ 602 examples: const [
603 "main() => await -3;", 603 "main() => await -3;",
604 "foo() => await -3; main() => foo();" 604 "foo() => await -3; main() => foo();"
605 ]), 605 ]),
606 606
607 MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE: const MessageTemplate( 607 MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE: const MessageTemplate(
608 MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE, 608 MessageKind.CANNOT_RESOLVE_AWAIT_IN_CLOSURE,
609 "Cannot resolve '#{name}'.", 609 "Cannot resolve '#{name}'.",
610 howToFix: "Did you mean to add the 'async' marker " 610 howToFix: "Did you mean to add the 'async' marker "
611 "to the enclosing function?", 611 "to the enclosing function?",
612 examples: const ["main() { (() => await -3)(); }",]), 612 examples: const [
613 "main() { (() => await -3)(); }",
614 ]),
613 615
614 MessageKind.CANNOT_RESOLVE_IN_INITIALIZER: const MessageTemplate( 616 MessageKind.CANNOT_RESOLVE_IN_INITIALIZER: const MessageTemplate(
615 MessageKind.CANNOT_RESOLVE_IN_INITIALIZER, 617 MessageKind.CANNOT_RESOLVE_IN_INITIALIZER,
616 "Cannot resolve '#{name}'. It would be implicitly looked up on this " 618 "Cannot resolve '#{name}'. It would be implicitly looked up on this "
617 "instance, but instances are not available in initializers.", 619 "instance, but instances are not available in initializers.",
618 howToFix: "Try correcting the unresolved reference or move the " 620 howToFix: "Try correcting the unresolved reference or move the "
619 "initialization to a constructor body.", 621 "initialization to a constructor body.",
620 examples: const [ 622 examples: const [
621 """ 623 """
622 class A { 624 class A {
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 "in superclass '#{superclassName}'."), 1991 "in superclass '#{superclassName}'."),
1990 1992
1991 MessageKind.ASSIGNING_TYPE: const MessageTemplate( 1993 MessageKind.ASSIGNING_TYPE: const MessageTemplate(
1992 MessageKind.ASSIGNING_TYPE, "Cannot assign a value to a type."), 1994 MessageKind.ASSIGNING_TYPE, "Cannot assign a value to a type."),
1993 1995
1994 MessageKind.IF_NULL_ASSIGNING_TYPE: const MessageTemplate( 1996 MessageKind.IF_NULL_ASSIGNING_TYPE: const MessageTemplate(
1995 MessageKind.IF_NULL_ASSIGNING_TYPE, 1997 MessageKind.IF_NULL_ASSIGNING_TYPE,
1996 "Cannot assign a value to a type. Note that types are never null, " 1998 "Cannot assign a value to a type. Note that types are never null, "
1997 "so this ??= assignment has no effect.", 1999 "so this ??= assignment has no effect.",
1998 howToFix: "Try removing the '??=' assignment.", 2000 howToFix: "Try removing the '??=' assignment.",
1999 examples: const ["class A {} main() { print(A ??= 3);}",]), 2001 examples: const [
2002 "class A {} main() { print(A ??= 3);}",
2003 ]),
2000 2004
2001 MessageKind.VOID_NOT_ALLOWED: const MessageTemplate( 2005 MessageKind.VOID_NOT_ALLOWED: const MessageTemplate(
2002 MessageKind.VOID_NOT_ALLOWED, 2006 MessageKind.VOID_NOT_ALLOWED,
2003 "Type 'void' can't be used here because it isn't a return type.", 2007 "Type 'void' can't be used here because it isn't a return type.",
2004 howToFix: 2008 howToFix:
2005 "Try removing 'void' keyword or replace it with 'var', 'final', " 2009 "Try removing 'void' keyword or replace it with 'var', 'final', "
2006 "or a type.", 2010 "or a type.",
2007 examples: const [ 2011 examples: const [
2008 "void x; main() {}", 2012 "void x; main() {}",
2009 "foo(void x) {} main() { foo(null); }", 2013 "foo(void x) {} main() { foo(null); }",
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 """, 3082 """,
3079 """ 3083 """
3080 main() => r\"\"\" 3084 main() => r\"\"\"
3081 """ 3085 """
3082 ]), 3086 ]),
3083 3087
3084 MessageKind.UNMATCHED_TOKEN: const MessageTemplate( 3088 MessageKind.UNMATCHED_TOKEN: const MessageTemplate(
3085 MessageKind.UNMATCHED_TOKEN, 3089 MessageKind.UNMATCHED_TOKEN,
3086 "Can't find '#{end}' to match '#{begin}'.", 3090 "Can't find '#{end}' to match '#{begin}'.",
3087 howToFix: DONT_KNOW_HOW_TO_FIX, 3091 howToFix: DONT_KNOW_HOW_TO_FIX,
3088 examples: const ["main(", "main(){", "main(){]}",]), 3092 examples: const [
3093 "main(",
3094 "main(){",
3095 "main(){]}",
3096 ]),
3089 3097
3090 MessageKind.UNTERMINATED_TOKEN: const MessageTemplate( 3098 MessageKind.UNTERMINATED_TOKEN: const MessageTemplate(
3091 MessageKind.UNTERMINATED_TOKEN, 3099 MessageKind.UNTERMINATED_TOKEN,
3092 // This is a fall-back message that shouldn't happen. 3100 // This is a fall-back message that shouldn't happen.
3093 "Incomplete token."), 3101 "Incomplete token."),
3094 3102
3095 MessageKind.EXPONENT_MISSING: const MessageTemplate( 3103 MessageKind.EXPONENT_MISSING: const MessageTemplate(
3096 MessageKind.EXPONENT_MISSING, 3104 MessageKind.EXPONENT_MISSING,
3097 "Numbers in exponential notation should always contain an exponent" 3105 "Numbers in exponential notation should always contain an exponent"
3098 " (an integer number with an optional sign).", 3106 " (an integer number with an optional sign).",
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3202 ), 3210 ),
3203 3211
3204 MessageKind.MAIN_NOT_A_FUNCTION: const MessageTemplate( 3212 MessageKind.MAIN_NOT_A_FUNCTION: const MessageTemplate(
3205 MessageKind.MAIN_NOT_A_FUNCTION, "'#{main}' is not a function.", 3213 MessageKind.MAIN_NOT_A_FUNCTION, "'#{main}' is not a function.",
3206 howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */ 3214 howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */
3207 examples: const ['var main;']), 3215 examples: const ['var main;']),
3208 3216
3209 MessageKind.MAIN_WITH_EXTRA_PARAMETER: const MessageTemplate( 3217 MessageKind.MAIN_WITH_EXTRA_PARAMETER: const MessageTemplate(
3210 MessageKind.MAIN_WITH_EXTRA_PARAMETER, 3218 MessageKind.MAIN_WITH_EXTRA_PARAMETER,
3211 "'#{main}' cannot have more than two parameters.", 3219 "'#{main}' cannot have more than two parameters.",
3212 howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */ 3220 howToFix: DONT_KNOW_HOW_TO_FIX,
3221 /* Don't state the obvious. */
3213 examples: const ['main(a, b, c) {}']), 3222 examples: const ['main(a, b, c) {}']),
3214 3223
3215 MessageKind.COMPILER_CRASHED: const MessageTemplate( 3224 MessageKind.COMPILER_CRASHED: const MessageTemplate(
3216 MessageKind.COMPILER_CRASHED, 3225 MessageKind.COMPILER_CRASHED,
3217 "The compiler crashed when compiling this element."), 3226 "The compiler crashed when compiling this element."),
3218 3227
3219 MessageKind.PLEASE_REPORT_THE_CRASH: const MessageTemplate( 3228 MessageKind.PLEASE_REPORT_THE_CRASH: const MessageTemplate(
3220 MessageKind.PLEASE_REPORT_THE_CRASH, 3229 MessageKind.PLEASE_REPORT_THE_CRASH,
3221 ''' 3230 '''
3222 The compiler is broken. 3231 The compiler is broken.
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
3808 static String convertToString(value) { 3817 static String convertToString(value) {
3809 if (value is ErrorToken) { 3818 if (value is ErrorToken) {
3810 // Shouldn't happen. 3819 // Shouldn't happen.
3811 return value.assertionMessage; 3820 return value.assertionMessage;
3812 } else if (value is Token) { 3821 } else if (value is Token) {
3813 value = value.value; 3822 value = value.value;
3814 } 3823 }
3815 return '$value'; 3824 return '$value';
3816 } 3825 }
3817 } 3826 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/inferrer/inferrer_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698