Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
silvio2402 committed Jan 23, 2025
1 parent 6360242 commit 3b67d1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/src/phonenumbers/phonecontextparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
namespace i18n {
namespace phonenumbers {

// Parses the phone-context parameter of a phone number in RFC3966 format.
class PhoneContextParser {
friend class PhoneNumberUtil;
friend class PhoneContextParserTest;
Expand All @@ -45,6 +46,13 @@ class PhoneContextParser {
std::shared_ptr<PhoneNumberRegExpsAndMappings> reg_exps,
std::shared_ptr<PhoneNumberNormalizer> normalizer);

// Parses the phone-context parameter of a phone number in RFC3966 format.
// If the phone-context parameter is not present, returns std::nullopt. If it
// is present but invalid, returns an error status. If it is present and
// valid, returns a PhoneContext object. This object contains the raw value of
// the phone-context parameter. Additionally, if the phone-context is exactly
// and only a + followed by a valid country code, it also contains the country
// code.
absl::StatusOr<std::optional<PhoneContextParser::PhoneContext>> Parse(
absl::string_view phone_number);

Expand Down
1 change: 1 addition & 0 deletions cpp/src/phonenumbers/phonenumbernormalizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
namespace i18n {
namespace phonenumbers {

// Util class to normalize phone numbers.
class PhoneNumberNormalizer {
friend class AsYouTypeFormatter;
friend class PhoneContextParser;
Expand Down

0 comments on commit 3b67d1f

Please sign in to comment.