From d6868d1e9deb7c376c87b750c854f1088c125421 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 15 Mar 2022 10:43:33 -0400 Subject: LibJS: Reorganize spec steps for Intl.Locale This is an editorial change in the Intl spec: https://github.com/tc39/ecma402/commit/31f6003 --- Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp index 071d7dc742..30d315e4f3 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Tim Flynn + * Copyright (c) 2021-2022, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ @@ -40,7 +40,7 @@ static ThrowCompletionOr> get_string_option(GlobalObject& globa return option.as_string().string(); } -// 14.1.1 ApplyOptionsToTag ( tag, options ), https://tc39.es/ecma402/#sec-apply-options-to-tag +// 14.1.2 ApplyOptionsToTag ( tag, options ), https://tc39.es/ecma402/#sec-apply-options-to-tag static ThrowCompletionOr apply_options_to_tag(GlobalObject& global_object, StringView tag, Object const& options) { auto& vm = global_object.vm(); @@ -107,7 +107,7 @@ static ThrowCompletionOr apply_options_to_tag(GlobalObject& global_objec return JS::Intl::canonicalize_unicode_locale_id(*locale_id); } -// 14.1.2 ApplyUnicodeExtensionToTag ( tag, options, relevantExtensionKeys ), https://tc39.es/ecma402/#sec-apply-unicode-extension-to-tag +// 14.1.3 ApplyUnicodeExtensionToTag ( tag, options, relevantExtensionKeys ), https://tc39.es/ecma402/#sec-apply-unicode-extension-to-tag static LocaleAndKeys apply_unicode_extension_to_tag(StringView tag, LocaleAndKeys options, Span relevant_extension_keys) { // 1. Assert: Type(tag) is String. @@ -236,14 +236,14 @@ void LocaleConstructor::initialize(GlobalObject& global_object) define_direct_property(vm.names.length, Value(1), Attribute::Configurable); } -// 14.1.3 Intl.Locale ( tag [ , options ] ), https://tc39.es/ecma402/#sec-Intl.Locale +// 14.1.1 Intl.Locale ( tag [ , options ] ), https://tc39.es/ecma402/#sec-Intl.Locale ThrowCompletionOr LocaleConstructor::call() { // 1. If NewTarget is undefined, throw a TypeError exception. return vm().throw_completion(global_object(), ErrorType::ConstructorWithoutNew, "Intl.Locale"); } -// 14.1.3 Intl.Locale ( tag [ , options ] ), https://tc39.es/ecma402/#sec-Intl.Locale +// 14.1.1 Intl.Locale ( tag [ , options ] ), https://tc39.es/ecma402/#sec-Intl.Locale ThrowCompletionOr LocaleConstructor::construct(FunctionObject& new_target) { auto& vm = this->vm(); -- cgit v1.2.3