Skip to content

Instantly share code, notes, and snippets.

@BFergerson
Created August 5, 2018 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFergerson/043e7547cf7ddac7951ac4f92c3ae34e to your computer and use it in GitHub Desktop.
Save BFergerson/043e7547cf7ddac7951ac4f92c3ae34e to your computer and use it in GitHub Desktop.
match
#find all functions in bfergerson/myproject
$myProject isa project has name "bfergerson/myproject";
$myFile isa file; ($myFile, $myProject) isa defines;
$myFunction isa function-instance; ($myFunction, $myFile) isa defines;
#follow defined functions to referenced functions
($myFunction, $funcDefs) isa function_definition;
($funcDefs, $func); ($func, $funcRefs);
($funcRefs, $refFunction) isa function_reference;
#return all functions which reference functions in bfergerson/myproject
($refFunction, $externalFunction) isa ref_call;
get $externalFunction;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment