Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Multiple patterns from a file. #118

Merged
merged 2 commits into from
May 4, 2015

Conversation

mutantzombie
Copy link

This PR adds a -multi option to combine with -f so that patterns are taken from a file, one per line.

It also changes sgrep so that the AST is built once and multiple patterns run against the AST instead of rebuilding a file's AST for each pattern.

One limitation is that patterns must be confined to a single line. Proposing a format to enable sgrep (e.g. JSON) to load multiple patterns of arbitrary length would be a separate PR.

Thanks,
Mike

aryx added a commit that referenced this pull request May 4, 2015
@aryx aryx merged commit 6248aee into facebookarchive:master May 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants