HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Oreo
|
8.0.0_r4
下载
查看原文件
收藏
根目录
external
v8
src
pending-compilation-error-handler.h
// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_PENDING_COMPILATION_ERROR_HANDLER_H_ #define V8_PENDING_COMPILATION_ERROR_HANDLER_H_ #include "src/base/macros.h" #include "src/globals.h" #include "src/handles.h" #include "src/messages.h" namespace v8 { namespace internal { class AstRawString; class Isolate; class Script; // Helper class for handling pending compilation errors consistently in various // compilation phases. class PendingCompilationErrorHandler { public: PendingCompilationErrorHandler() : has_pending_error_(false), start_position_(-1), end_position_(-1), message_(MessageTemplate::kNone), arg_(nullptr), char_arg_(nullptr), error_type_(kSyntaxError) {} void ReportMessageAt(int start_position, int end_position, MessageTemplate::Template message, const char* arg = nullptr, ParseErrorType error_type = kSyntaxError) { if (has_pending_error_) return; has_pending_error_ = true; start_position_ = start_position; end_position_ = end_position; message_ = message; char_arg_ = arg; arg_ = nullptr; error_type_ = error_type; } void ReportMessageAt(int start_position, int end_position, MessageTemplate::Template message, const AstRawString* arg, ParseErrorType error_type = kSyntaxError) { if (has_pending_error_) return; has_pending_error_ = true; start_position_ = start_position; end_position_ = end_position; message_ = message; char_arg_ = nullptr; arg_ = arg; error_type_ = error_type; } void ReportMessageAt(int start_position, int end_position, MessageTemplate::Template message, Handle
arg, ParseErrorType error_type = kSyntaxError) { if (has_pending_error_) return; has_pending_error_ = true; start_position_ = start_position; end_position_ = end_position; message_ = message; char_arg_ = nullptr; arg_ = nullptr; handle_arg_ = arg; error_type_ = error_type; } bool has_pending_error() const { return has_pending_error_; } void ThrowPendingError(Isolate* isolate, Handle
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册