mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Macro. Add comments for macro diagnostics.
Change-Id: Ib01e2c43c4fe374cfe3aa38ff2b0c029c0d9adb9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350403 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
4dfb2056c0
commit
00be96e511
3 changed files with 14 additions and 0 deletions
|
@ -106,6 +106,7 @@ class HintCode extends AnalyzerErrorCode {
|
|||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Reported when the macro uses `Builder.report()` with `Severity.info`.
|
||||
/// Parameters:
|
||||
/// 0: the message
|
||||
static const HintCode MACRO_INFO = HintCode(
|
||||
|
|
|
@ -3026,6 +3026,8 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Reported when there is an issue converting a macro application argument
|
||||
/// into a value. So, we cannot instantiate the macro, and run it.
|
||||
/// Parameters:
|
||||
/// 0: the message
|
||||
static const CompileTimeErrorCode MACRO_APPLICATION_ARGUMENT_ERROR =
|
||||
|
@ -3045,6 +3047,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
"Try removing one or more macro applications to break the cycle.",
|
||||
);
|
||||
|
||||
/// Reported when the macro uses `Builder.report()` with `Severity.error`.
|
||||
/// Parameters:
|
||||
/// 0: the message
|
||||
static const CompileTimeErrorCode MACRO_ERROR = CompileTimeErrorCode(
|
||||
|
@ -3052,6 +3055,8 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
"{0}",
|
||||
);
|
||||
|
||||
/// Reported when there is an exception inside the analyzer when running
|
||||
/// macros. Should not happen, but just in case.
|
||||
/// Parameters:
|
||||
/// 0: the message
|
||||
/// 1: the stack trace
|
||||
|
@ -6787,6 +6792,7 @@ class WarningCode extends AnalyzerErrorCode {
|
|||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Reported when the macro uses `Builder.report()` with `Severity.warning`.
|
||||
/// Parameters:
|
||||
/// 0: the message
|
||||
static const WarningCode MACRO_WARNING = WarningCode(
|
||||
|
|
|
@ -9525,16 +9525,21 @@ CompileTimeErrorCode:
|
|||
MACRO_APPLICATION_ARGUMENT_ERROR:
|
||||
problemMessage: "{0}"
|
||||
comment: |-
|
||||
Reported when there is an issue converting a macro application argument
|
||||
into a value. So, we cannot instantiate the macro, and run it.
|
||||
Parameters:
|
||||
0: the message
|
||||
MACRO_ERROR:
|
||||
problemMessage: "{0}"
|
||||
comment: |-
|
||||
Reported when the macro uses `Builder.report()` with `Severity.error`.
|
||||
Parameters:
|
||||
0: the message
|
||||
MACRO_INTERNAL_EXCEPTION:
|
||||
problemMessage: "{0} {1}"
|
||||
comment: |-
|
||||
Reported when there is an exception inside the analyzer when running
|
||||
macros. Should not happen, but just in case.
|
||||
Parameters:
|
||||
0: the message
|
||||
1: the stack trace
|
||||
|
@ -20676,6 +20681,7 @@ HintCode:
|
|||
MACRO_INFO:
|
||||
problemMessage: "{0}"
|
||||
comment: |-
|
||||
Reported when the macro uses `Builder.report()` with `Severity.info`.
|
||||
Parameters:
|
||||
0: the message
|
||||
UNNECESSARY_CAST:
|
||||
|
@ -24491,6 +24497,7 @@ WarningCode:
|
|||
MACRO_WARNING:
|
||||
problemMessage: "{0}"
|
||||
comment: |-
|
||||
Reported when the macro uses `Builder.report()` with `Severity.warning`.
|
||||
Parameters:
|
||||
0: the message
|
||||
MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_ONE:
|
||||
|
|
Loading…
Reference in a new issue