ladybird/Libraries/LibJS/Tests
Linus Groh a598a2c19d LibJS: Function declarations in if statement clauses
https://tc39.es/ecma262/#sec-functiondeclarations-in-ifstatement-statement-clauses

B.3.4 FunctionDeclarations in IfStatement Statement Clauses

The following augments the IfStatement production in 13.6:

    IfStatement[Yield, Await, Return] :
        if ( Expression[+In, ?Yield, ?Await] ) FunctionDeclaration[?Yield, ?Await, ~Default] else Statement[?Yield, ?Await, ?Return]
        if ( Expression[+In, ?Yield, ?Await] ) Statement[?Yield, ?Await, ?Return] else FunctionDeclaration[?Yield, ?Await, ~Default]
        if ( Expression[+In, ?Yield, ?Await] ) FunctionDeclaration[?Yield, ?Await, ~Default] else FunctionDeclaration[?Yield, ?Await, ~Default]
        if ( Expression[+In, ?Yield, ?Await] ) FunctionDeclaration[?Yield, ?Await, ~Default]

This production only applies when parsing non-strict code. Code matching
this production is processed as if each matching occurrence of
FunctionDeclaration[?Yield, ?Await, ~Default] was the sole
StatementListItem of a BlockStatement occupying that position in the
source code. The semantics of such a synthetic BlockStatement includes
the web legacy compatibility semantics specified in B.3.3.
2020-10-31 15:25:12 +01:00
..
builtins LibJS: Tweak generated source in 'new Function()' to match ES 2015 spec 2020-10-29 22:27:55 +01:00
classes LibJS: Rest parameter in setter functions is a syntax error 2020-10-20 20:27:58 +02:00
functions LibJS: Allow all line terminators to be used for line continuations 2020-10-25 19:45:47 +01:00
iterators
loops LibJS: Always insert semicolon after do-while statement if missing 2020-10-28 21:11:32 +01:00
operators LibJS: Implement logical assignment operators (&&=, ||=, ??=) 2020-10-05 17:57:26 +02:00
add-values-to-primitive.js
automatic-semicolon-insertion.js
break-continue-syntax-errors.js LibJS: break or continue with nonexistent label is a syntax error 2020-10-08 23:27:16 +02:00
comments-basic.js LibJS: "-->" preceded by token on same line isn't start of HTML-like comment 2020-10-29 22:28:15 +01:00
computed-property-throws.js
const-declaration-missing-initializer.js LibJS: Require initializer for 'const' variable declaration 2020-10-30 23:43:38 +01:00
const-reassignment.js
custom-@@hasInstance.js
custom-@@toStringTag.js
debugger-statement.js
empty-statements.js
exception-in-catch-block.js
exception-ReferenceError.js
exponentiation-basic.js
if-statement-function-declaration.js LibJS: Function declarations in if statement clauses 2020-10-31 15:25:12 +01:00
indexed-access-string-object.js
invalid-lhs-in-assignment.js LibJS: Make assignment to CallExpression a syntax error in strict mode 2020-10-05 09:25:04 +02:00
labels.js LibJS: break or continue with nonexistent label is a syntax error 2020-10-08 23:27:16 +02:00
let-scoping.js
new-expression.js
numeric-literals-basic.js LibJS: Don't parse numeric literal containing 8 or 9 as octal 2020-10-28 21:11:32 +01:00
object-basic.js LibJS: Rest parameter in setter functions is a syntax error 2020-10-20 20:27:58 +02:00
object-expression-computed-property.js LibJS: Fix PropertyName::from_value() for negative and non-int numbers 2020-10-08 10:02:47 +02:00
object-getter-setter-shorthand.js
object-method-shorthand.js
object-spread.js
parser-declaration-in-single-statement-context.js LibJS: Distinguish between statement and declaration 2020-10-23 19:13:06 +02:00
parser-line-terminators.js LibJS: Tweak generated source in 'new Function()' to match ES 2015 spec 2020-10-29 22:27:55 +01:00
parser-unary-associativity.js
program-strict-mode.js
return.js LibJS: Fix return statements not working properly in loops 2020-10-08 23:23:55 +02:00
strict-mode-blocks.js LibJS: Strict mode is now handled by Functions and Programs, not Blocks 2020-10-04 10:46:12 +02:00
strict-mode-errors.js
string-escapes.js LibJS: Use GenericLexer for Token::string_value() 2020-10-29 11:52:31 +01:00
string-spread.js
switch-basic.js LibJS: Multiple 'default' clauses in switch statement are a syntax error 2020-10-19 11:30:14 +02:00
switch-break.js
tagged-template-literals.js
template-literals.js LibJS: Parse line continuations in string literals properly 2020-10-25 15:16:47 +01:00
test-common-tests.js LibJS: Restrict toEval() failures to SyntaxError 2020-10-28 21:11:32 +01:00
test-common.js LibJS: Restrict toEval() failures to SyntaxError 2020-10-28 21:11:32 +01:00
throw-basic.js
to-number-basic.js
to-number-exception.js
try-catch-finally-nested.js
try-catch-finally.js LibJS: Allow try statement with only finally clause 2020-10-24 16:34:01 +02:00
update-expression-on-member-expression.js
update-expressions-basic.js
use-strict-directive.js LibJS: Disallow escape sequence/line continuation in use strict directive 2020-10-24 16:34:01 +02:00
var-multiple-declarator.js
var-scoping.js
variable-undefined.js