17DEFINE_FLAG(
bool, silent_warnings,
false,
"Silence warnings.");
18DEFINE_FLAG(
bool, warning_as_error,
false,
"Treat warnings as errors.");
23 bool report_after_token,
25 const char* message_header;
28 message_header =
"warning";
31 message_header =
"error";
34 message_header =
"bailout";
43 intptr_t
line, column;
44 if (
script.GetTokenLocation(token_pos, &
line, &column)) {
45 const intptr_t token_len =
script.GetTokenLength(token_pos);
46 if (report_after_token) {
47 column += token_len < 0 ? 1 : token_len;
60 const String& script_line =
64 strs.
SetAt(3, script_line);
68 Heap::kOld,
"%*s\n",
static_cast<int>(column),
"^"));
69 strs.
SetAt(5, column_line);
112 if (prev_error.IsUnwindError()) {
126 bool report_after_token,
138 bool report_after_token,
143 if (FLAG_silent_warnings) {
146 if (!FLAG_warning_as_error) {
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
void SetAt(intptr_t index, const Object &value) const
static LanguageErrorPtr static LanguageErrorPtr NewFormattedV(const Error &prev_error, const Script &script, TokenPosition token_pos, bool report_after_token, Report::Kind kind, Heap::Space space, const char *format, va_list args)
DART_NORETURN void Jump(int value, const Error &error)
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static void static void MessageV(Kind kind, const Script &script, TokenPosition token_pos, bool report_after_token, const char *format, va_list args)
static DART_NORETURN void LongJump(const Error &error)
static DART_NORETURN void LongJumpF(const Error &prev_error, const Script &script, TokenPosition token_pos, const char *format,...) PRINTF_ATTRIBUTE(4
static void MessageF(Kind kind, const Script &script, TokenPosition token_pos, bool report_after_token, const char *format,...) PRINTF_ATTRIBUTE(5
static DART_NORETURN void static DART_NORETURN void LongJumpV(const Error &prev_error, const Script &script, TokenPosition token_pos, const char *format, va_list args)
static constexpr bool AtLocation
static StringPtr PrependSnippet(Kind kind, const Script &script, TokenPosition token_pos, bool report_after_token, const String &message)
static StringPtr NewFormatted(const char *format,...) PRINTF_ATTRIBUTE(1
static StringPtr static StringPtr static StringPtr NewFormattedV(const char *format, va_list args, Heap::Space space=Heap::kNew)
static StringPtr ConcatAll(const Array &strings, Heap::Space space=Heap::kNew)
static StringPtr Concat(const String &str1, const String &str2, Heap::Space space=Heap::kNew)
static const char * ToCString(Thread *thread, StringPtr ptr)
static const String & NewLine()
LongJumpScope * long_jump_base() const
static Thread * Current()
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
DEFINE_FLAG(bool, print_cluster_information, false, "Print information about clusters written to snapshot")