mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-19 00:31:06 +00:00
Merge commit '6e92d2345e8231a44556ce7d416451f5f3e6c398' as 'engine262'
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { Completion } from '../completion.mts';
|
||||
import type { ParseNode } from '../parser/ParseNode.mts';
|
||||
import { StringValue } from '../static-semantics/all.mts';
|
||||
|
||||
/** https://tc39.es/ecma262/#sec-continue-statement-runtime-semantics-evaluation */
|
||||
// ContinueStatement :
|
||||
// `continue` `;`
|
||||
// `continue` LabelIdentifier `;`
|
||||
export function Evaluate_ContinueStatement({ LabelIdentifier }: ParseNode.ContinueStatement) {
|
||||
if (!LabelIdentifier) {
|
||||
// 1. Return Completion { [[Type]]: continue, [[Value]]: empty, [[Target]]: empty }.
|
||||
return new Completion({ Type: 'continue', Value: undefined, Target: undefined });
|
||||
}
|
||||
// 1. Let label be the StringValue of LabelIdentifier.
|
||||
const label = StringValue(LabelIdentifier);
|
||||
// 2. Return Completion { [[Type]]: continue, [[Value]]: empty, [[Target]]: label }.
|
||||
return new Completion({ Type: 'continue', Value: undefined, Target: label });
|
||||
}
|
||||
Reference in New Issue
Block a user