diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-25 15:59:35 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-25 15:59:35 -0500 |
| commit | 922b5857005be0609ecc59149748947a5c8b4b10 (patch) | |
| tree | 6e72a0048fbae736756f4a25727af2ada70aa534 /parse.c | |
| parent | 32532836b91032f2dfe8258b3b4fcc6288609961 (diff) | |
Tweaks to NONE parsing and tests
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1535,9 +1535,12 @@ PARSER(parse_none) { if (!match_word(&pos, "NONE")) return NULL; + const char *none_end = pos; + spaces(&pos); if (!match(&pos, ":")) - return NewAST(ctx->file, start, pos, None, .type=NULL); + return NewAST(ctx->file, start, none_end, None, .type=NULL); + spaces(&pos); type_ast_t *type = parse_type(ctx, pos); if (!type) return NULL; return NewAST(ctx->file, start, type->end, None, .type=type); |
