Skip to content

Commit

Permalink
// add comments about "basic URL parser" implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Sep 20, 2023
1 parent 49dd9b1 commit 76e4704
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/upa/url.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class url {
///
/// More info: https://url.spec.whatwg.org/#dom-url-searchparams
///
/// Returned reference is valid thru lifetime of url. or until url's move assignment
/// Returned reference is valid thru lifetime of url, or until url's move assignment
/// operation (except @c safe_assign, which preserves reference validity).
///
/// @return reference to this’s query object (url_search_params class)
Expand Down Expand Up @@ -1313,6 +1313,10 @@ inline void url::swap(url& other) UPA_NOEXCEPT_17 {

// Parser

// Implements "basic URL parser" https://url.spec.whatwg.org/#concept-basic-url-parser
// without encoding, url and state override arguments. It resets this url object to
// an empty value and then parses the input and modifies this url object.
// Returns url_result::Ok on success, or an error value on parsing failure.
template <typename CharT>
inline url_result url::do_parse(const CharT* first, const CharT* last, const url* base) {
const url_result res = [&]() {
Expand Down Expand Up @@ -1496,7 +1500,9 @@ inline bool url::hash(StrT&& str) {

namespace detail {

// https://url.spec.whatwg.org/#concept-basic-url-parser
// Implements "basic URL parser" https://url.spec.whatwg.org/#concept-basic-url-parser
// without 1 step. It modifies the URL stored in the urls object.
// Returns url_result::Ok on success, or an error value on parsing failure.
template <typename CharT>
inline url_result url_parser::url_parse(url_serializer& urls, const CharT* first, const CharT* last, const url* base, State state_override)
{
Expand Down

0 comments on commit 76e4704

Please sign in to comment.