- cgen = self->left->codegen;
- if (!(*cgen)((ast_expression*)(self->left), func, false, &left))
- return false;
-
- cgen = self->right->codegen;
- if (!(*cgen)((ast_expression*)(self->right), func, false, &right))
- return false;
+ if (self->right_first) {
+ cgen = self->right->codegen;
+ if (!(*cgen)((ast_expression*)(self->right), func, false, &right))
+ return false;
+ cgen = self->left->codegen;
+ if (!(*cgen)((ast_expression*)(self->left), func, false, &left))
+ return false;
+ } else {
+ cgen = self->left->codegen;
+ if (!(*cgen)((ast_expression*)(self->left), func, false, &left))
+ return false;
+ cgen = self->right->codegen;
+ if (!(*cgen)((ast_expression*)(self->right), func, false, &right))
+ return false;
+ }