// Copyright 2021 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_TEMPORAL_TEMPORAL_PARSER_H_ #define V8_TEMPORAL_TEMPORAL_PARSER_H_ #include <optional> #include "src/execution/isolate.h" namespace v8::internal { /** * ParsedISO8601Result contains the parsed result of ISO 8601 grammar * documented in #sec-temporal-iso8601grammar * for TemporalInstantString, TemporalZonedDateTimeString, * CalendarName, TemporalDateString, TemporalDateTimeString, * TemporalMonthDayString, TemporalRelativeToString, TemporalTimeString, * TimeZoneIdentifier, and TemporalYearMonthString. For all the fields * represented by int32_t, a special value kMinInt31 is used to represent the * field is "undefined" after parsing. */ struct ParsedISO8601Result { … }; /** * ParsedISO8601Duration contains the parsed result of ISO 8601 grammar * documented in #prod-TemporalDurationString * for TemporalDurationString. * A special value kEmpty is used to represent the * field is "undefined" after parsing for all fields except sign. */ struct ParsedISO8601Duration { … }; /** * TemporalParser is low level parsing functions to support the implementation * of various ParseTemporal*String Abstract Operations listed after * #sec-temporal-parsetemporalinstantstring. * All the methods take an Isolate, a Handle<String> as input, and also a * pointer to a bool to answer the "satisfy the syntax of a Temporal*String" * question and return the parsed result. */ class V8_EXPORT_PRIVATE TemporalParser { … }; #undef DEFINE_PARSE_METHOD } // namespace v8::internal #endif // V8_TEMPORAL_TEMPORAL_PARSER_H_