condition function

bool condition(
  1. String str
)

condition — empty Str → false; returns bool on success, false on failure.

Implementation

bool condition(String str) {
  if (str.isEmpty) return false;
  final ev = _currentEvaluator;
  if (ev == null) return false;
  final r = ev.cond(str);
  if (ev.hasError) {
    // ignore: avoid_print
    print('<font color="#ff0000">[ERROR] $str # ${ev.lastError}</font>');
    return false;
  }
  return r;
}