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

Lookup an expression in one of the parser dictionaries.

[in]expthe expression
[in]nmthe dictionary name
[in]icasetrue to ignore case in lookups
true if the expression is matched, false otherwise

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;
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: