8000 Accept empty Array and Object constructor values by Doomguy-BFG9000 · Pull Request #139 · tomnomnom/gron · GitHub
[go: up one dir, main page]

Skip to content

Accept empty Array and Object constructor values - #139

Open
Doomguy-BFG9000 wants to merge 1 commit into
tomnomnom:masterfrom
Doomguy-BFG9000:feat/empty-js-constructors
Open

Doomguy-BFG9000 wants to merge 1 commit into
tomnomnom:masterfrom
Doomguy-BFG9000:feat/empty-js-constructors

Conversation

@Doomguy-BFG9000
Copy link
Copy Markdown

Ungron accepts empty new Array / new Array() and new Object / new Object() values and normalizes them to the existing empty array/object tokens, as requested in #96. Spaces and tabs around empty parentheses are supported.

Tests cover each supported form, ordinary quoted text and null, and rejection of constructor arguments, unknown constructors, split names, and malformed suffixes. A native executable smoke check also reconstructs a nested object and populated array.

Validation on Windows with Go 1.27.3: go test -count=1 ./..., go vet ./..., go build, and executable smoke checks passed. The legacy script/lint gometalinter toolchain was not run.

Closes #96.

This branch has not been deployed

No deployments
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.

Special-case new Array() and new Object

1 participant

0