mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Bug 755821: Function() should use the parser's argument parsing code
This commit is contained in:
parent
e7fdd26fde
commit
0e7a16c088
24 changed files with 321 additions and 469 deletions
|
|
@ -1020,12 +1020,12 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
|
|||
// Parse a module.
|
||||
Node moduleBody(ModuleSharedContext* modulesc);
|
||||
|
||||
// Parse a function, given only its body. Used for the Function and
|
||||
// Generator constructors.
|
||||
Node standaloneFunctionBody(HandleFunction fun, HandleScope enclosingScope,
|
||||
Handle<PropertyNameVector> formals,
|
||||
GeneratorKind generatorKind, FunctionAsyncKind asyncKind,
|
||||
Directives inheritedDirectives, Directives* newDirectives);
|
||||
// Parse a function, used for the Function, GeneratorFunction, and
|
||||
// AsyncFunction constructors.
|
||||
Node standaloneFunction(HandleFunction fun, HandleScope enclosingScope,
|
||||
mozilla::Maybe<uint32_t> parameterListEnd,
|
||||
GeneratorKind generatorKind, FunctionAsyncKind asyncKind,
|
||||
Directives inheritedDirectives, Directives* newDirectives);
|
||||
|
||||
// Parse a function, given only its arguments and body. Used for lazily
|
||||
// parsed functions.
|
||||
|
|
@ -1041,7 +1041,9 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
|
|||
// Parse a function's formal parameters and its body assuming its function
|
||||
// ParseContext is already on the stack.
|
||||
bool functionFormalParametersAndBody(InHandling inHandling, YieldHandling yieldHandling,
|
||||
Node pn, FunctionSyntaxKind kind);
|
||||
Node pn, FunctionSyntaxKind kind,
|
||||
mozilla::Maybe<uint32_t> parameterListEnd = mozilla::Nothing());
|
||||
|
||||
|
||||
// Determine whether |yield| is a valid name in the current context, or
|
||||
// whether it's prohibited due to strictness, JS version, or occurrence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue