diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-03 13:59:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-03 13:59:06 +0900 |
| commit | 4cdf4ddb24fb6f7d46d65dc55f44af1ff50119b5 (patch) | |
| tree | 3ef370b59df5f2fdffb63f48ef2165eda894eeb2 /main.c | |
| parent | 1c44079167dbac07e71e177b3ef125755c4308fc (diff) | |
| download | P4Dcc-4cdf4ddb24fb6f7d46d65dc55f44af1ff50119b5.tar.gz P4Dcc-4cdf4ddb24fb6f7d46d65dc55f44af1ff50119b5.tar.zst P4Dcc-4cdf4ddb24fb6f7d46d65dc55f44af1ff50119b5.zip | |
parenthesized expression
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -285,6 +285,11 @@ AST* parse_primitive_expr(PARSER* p) { buf[t->len] = 0; e->int_value = atoi(buf); return e; + } else if (t->kind == TK_PAREN_L) { + next_token(p); + AST* e = parse_expr(p); + expect(p, TK_PAREN_R); + return e; } else { fatal_error("parse_expr"); } |
