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

feat(ast): serialize StringLiterals to ESTree #7211

Closed

Conversation

ottomated
Copy link
Contributor

No description provided.

Copy link

graphite-app bot commented Nov 9, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ottomated and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added A-parser Area - Parser A-ast Area - AST C-enhancement Category - New feature or request labels Nov 9, 2024
@ottomated
Copy link
Contributor Author

@overlookmotel needs some work. There's a lot of places where string literals are constructed and don't have a raw value, and I'm not sure what to do there.

@overlookmotel
Copy link
Collaborator

overlookmotel commented Nov 12, 2024

Hmm, yes, tricky.

I've opened #7254 for the wider problem of these raw fields.

I now realize my suggestion to add a raw field to StringLiteral was unwise. Sorry.

I suggest for now just skip the raw field for StringLiterals entirely in JSON AST, until we resolve #7254. If we decide to go the route of getting raw values via methods, we'll need a way to get the source text into the serializer. But, as we've discussed in #6347, we need to find a way to get external state into the serializer anyway, and we have a few options.

@overlookmotel
Copy link
Collaborator

Implemented in #7263 instead.

@overlookmotel overlookmotel deleted the 11-08-feat_ast_serialize_stringliterals_to_estree branch November 13, 2024 13:40
overlookmotel pushed a commit that referenced this pull request Nov 13, 2024
#7211 alternative. Makes the `raw` field on estree literals optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast Area - AST A-parser Area - Parser C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants