hasNonEmptyStringValue function

bool hasNonEmptyStringValue(
  1. Expression expr
)

Check if an expression has a non-empty string value

Implementation

bool hasNonEmptyStringValue(Expression expr) {
  // Check for null literal
  if (expr is NullLiteral) {
    return false;
  }

  // Check for empty string literal
  if (expr is SimpleStringLiteral) {
    return expr.value.isNotEmpty;
  }

  // For other expressions (variables, function calls, etc.), assume they're valid
  // since we can't evaluate them statically
  return true;
}