Merge commit '6e92d2345e8231a44556ce7d416451f5f3e6c398' as 'engine262'

This commit is contained in:
2026-03-27 10:07:29 +05:30
433 changed files with 90478 additions and 0 deletions
@@ -0,0 +1,15 @@
import type { ParseNode } from '../parser/ParseNode.mts';
export type FunctionDeclaration = ParseNode.FunctionExpression | ParseNode.GeneratorExpression | ParseNode.AsyncFunctionExpression | ParseNode.AsyncGeneratorExpression | ParseNode.ClassExpression | ParseNode.ArrowFunction | ParseNode.AsyncArrowFunction | ParseNode.ParenthesizedExpression & { readonly Expression: FunctionDeclaration };
export function IsFunctionDefinition(node: ParseNode): node is FunctionDeclaration {
if (node.type === 'ParenthesizedExpression') {
return IsFunctionDefinition(node.Expression);
}
return node.type === 'FunctionExpression'
|| node.type === 'GeneratorExpression'
|| node.type === 'AsyncGeneratorExpression'
|| node.type === 'AsyncFunctionExpression'
|| node.type === 'ClassExpression'
|| node.type === 'ArrowFunction'
|| node.type === 'AsyncArrowFunction';
}