[Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)

Michael Schroeder notifications at github.com
Wed Sep 18 11:53:02 UTC 2019


mlschroe commented on this pull request.



> +	result = v1->data.i != 0;
+	break;
+      case VALUE_TYPE_STRING:
+	result = v1->data.s[0] != '\0';
+	break;
+      default:
+	goto err;
+    }
+    valueFree(v1);
+    if (rdToken(state))
+      goto err;
+    v1 = doTernary(state);
+    if (v1 == NULL)
+      goto err;
+    if (state->nextToken != TOK_TERNARY_ALT) {
+      exprErr(&state, _("syntax error in expression"), state->p);

Damn. I'm copying from the wrong line ;)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/838#discussion_r325630357
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190918/e7f0d375/attachment-0001.html>


More information about the Rpm-maint mailing list