Lumiera  0.pre.03
»edit your freedom«
lumiera::advice::anonymous_namespace{binding.cpp} Namespace Reference

Functions

uint detectArity (smatch const &match)
 detect the arity of an predicate, as matched by findPredicate. More...
 
regex findPredicate ("\*"+matchSym+"("+matchArg+")?\*,?")
 sym(arg), groups: [symbol, parenthesis, argument symbol]
 

Variables

const string matchArg = "\\(\\s*"+matchSym+"?\\s*\\)"
 
const string matchSym = "(\\w+(?:[\\.\\-]\\w+)*)"
 

Function Documentation

◆ detectArity()

uint lumiera::advice::anonymous_namespace{binding.cpp}::detectArity ( smatch const &  match)
inline

detect the arity of an predicate, as matched by findPredicate.

Currently, we don't really parse predicate logic notation and thus we just distinguish nullary predicates (no argument) and predicates with one single constant argument.

Definition at line 65 of file common/advice/binding.cpp.