getgrit / gritql

GritQL is a query language for searching, linting, and modifying code.
https://docs.grit.io/
MIT License
3.07k stars 71 forks source link

Matching error #530

Open morgante opened 2 weeks ago

morgante commented 2 weeks ago

This should match:

language go

`WithExec($x)`
func myFunc() {
  return t.Base(image).
        WithMountedFile("/sss/"+imageRef, ctr.AsTarball()).
        WithExec([]string{"some", "op"}).Stdout(ctx)
}
morgante commented 2 weeks ago

This isn't straightforward to solve with a context string, because the t.WithExec part is actually in the source separate from the args.

We probably need equivalence classes of some sort for this.