1 // Copyright 2019 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_TORQUE_LS_JSON_PARSER_H_ 6 #define V8_TORQUE_LS_JSON_PARSER_H_ 7 8 #include "src/base/macros.h" 9 #include "src/base/optional.h" 10 #include "src/torque/ls/json.h" 11 #include "src/torque/utils.h" 12 13 namespace v8 { 14 namespace internal { 15 namespace torque { 16 namespace ls { 17 18 struct JsonParserResult { 19 JsonValue value; 20 base::Optional<TorqueMessage> error; 21 }; 22 23 V8_EXPORT_PRIVATE JsonParserResult ParseJson(const std::string& input); 24 25 } // namespace ls 26 } // namespace torque 27 } // namespace internal 28 } // namespace v8 29 30 #endif // V8_TORQUE_LS_JSON_PARSER_H_ 31