pub fn parse_condition(spec: &str) -> Result<Query>Expand description
Parse a one-word findrefs condition, as the CLI’s compound and rule options take them:
string:REGEX,literal:TEXT,type:PATTERNmethod:TARGET,field:TARGET: any member target form (as inmember_query), e.g.android.webkit.WebView->loadUrl; the class is exact unless prefixed~(fuzzy) or written without package, the name a regex / substring unless prefixed=or followed by a signature (exact)method:{RULE}: calls of the methods whose code matches RULEmethod:@FILE: calls of the methods FILE lists, one per lineextends:CLASS,impl:CLASS
The kind is read by parse_kind (methods:, Method: work too); the
grammar is crate::condition’s.
§Errors
EngineError::Query for a syntax error, an unknown kind, an invalid
value, or a rule of several conditions.