mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Add spec comments to Completion
This commit is contained in:
parent
e32265c896
commit
0f3899b24a
2 changed files with 8 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -345,13 +345,14 @@ public:
|
|||
|
||||
ThrowCompletionOr<Value> await(VM&, Value);
|
||||
|
||||
// 6.2.3.2 NormalCompletion ( value ), https://tc39.es/ecma262/#sec-normalcompletion
|
||||
// 6.2.4.1 NormalCompletion ( value ), https://tc39.es/ecma262/#sec-normalcompletion
|
||||
inline Completion normal_completion(Optional<Value> value)
|
||||
{
|
||||
// 1. Return Completion Record { [[Type]]: normal, [[Value]]: value, [[Target]]: empty }.
|
||||
return { Completion::Type::Normal, move(value), {} };
|
||||
}
|
||||
|
||||
// 6.2.3.3 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
|
||||
// 6.2.4.2 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
|
||||
Completion throw_completion(Value);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue