libcsdbg  1.28
C++ exception (and generic) stack trace debug library
bool csdbg::parser::lookup ( const string exp,
const i8 nm,
bool  icase = false 
) const
inlinevirtual

Lookup an expression in one of the parser dictionaries.

Parameters
[in]expthe expression
[in]nmthe dictionary name
[in]icasetrue to ignore case in lookups
Returns
true if the expression is matched, false otherwise
Exceptions
csdbg::exception

Definition at line 673 of file parser.cpp.

References get_dictionary(), csdbg::dictionary::lookup(), and unlikely.

Referenced by highlight().

674 {
675  dictionary *dict = get_dictionary(nm);
676  if ( unlikely(dict == NULL) )
677  return false;
678 
679  return dict->lookup(exp, icase) != NULL;
680 }
virtual dictionary * get_dictionary(const i8 *) const
Get a dictionary, indexed by name.
Definition: parser.cpp:375
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the call graph for this function:

+ Here is the caller graph for this function: