| 639 | /* Handle bare operands and ( expr ) syntax. */ |
| 640 | |
| 641 | static VALUE * |
| 642 | eval7 (bool evaluate) |
| 643 | { |
| 644 | #ifdef EVAL_TRACE |
| 645 | trace ("eval7"); |
| 646 | #endif |
| 647 | require_more_args (); |
| 648 | |
| 649 | if (nextarg ("(")) |
| 650 | { |
| 651 | VALUE *v = eval (evaluate); |
| 652 | if (nomoreargs ()) |
| 653 | error (EXPR_INVALID, 0, _("syntax error: expecting ')' after %s"), |
| 654 | quotearg_n_style (0, locale_quoting_style, *(args - 1))); |
| 655 | if (!nextarg (")")) |
| 656 | error (EXPR_INVALID, 0, _("syntax error: expecting ')' instead of %s"), |
| 657 | quotearg_n_style (0, locale_quoting_style, *args)); |
| 658 | return v; |
| 659 | } |
| 660 | |
| 661 | if (nextarg (")")) |
| 662 | error (EXPR_INVALID, 0, _("syntax error: unexpected ')'")); |
| 663 | |
| 664 | return str_value (*args++); |
| 665 | } |
| 666 | |
| 667 | /* Handle match, substr, index, and length keywords, and quoting "+". */ |
| 668 |
no test coverage detected