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

Metavariables for literals #25

Open
abhinav opened this issue Jun 8, 2021 · 0 comments
Open

Metavariables for literals #25

abhinav opened this issue Jun 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@abhinav
Copy link
Contributor

abhinav commented Jun 8, 2021

We should support metavariables to match on literals. That is, to match on "foo" and 42 below.

x := "foo"
const y = 42

This will make it possible to write patches that detect, say, hard-coded strings and turn them into constants or optimize them (moving compilation of a hard-coded regex from a hot path to a top-level variable, for example).

@sywhang sywhang added the enhancement New feature or request label Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants