Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function constructor for literals #156

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BobVarioa
Copy link
Contributor

@BobVarioa BobVarioa commented Jul 31, 2024

Title. Parsing the arguments is somewhat hacky, whenever/if we pull in acorn or perhaps only after #34, we should parse these correctly.
This is also vunerable to this type of "attack" (below), but currently I don't really see a better way to do it?

$ ./porf
> Function('a) { return 1 }; void function (', 'return 2')() // should throw
1

But definitely a correctness bug, albeit minor.

(+0.04 Test262 tho 🎉)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant