16 lines
284 B
C
16 lines
284 B
C
#include "../syntax.h"
|
|
|
|
bool parse_expr(struct parse_ctx *ctx, struct ast_node **out)
|
|
{
|
|
bool ok = false;
|
|
if (!ok && peek_arith_expr(ctx)) {
|
|
ok = parse_arith_expr(ctx, PRECEDENCE_MINIMUM, out);
|
|
}
|
|
|
|
if (!ok && peek_command(ctx)) {
|
|
ok = parse_command(ctx, out);
|
|
}
|
|
|
|
return ok;
|
|
}
|