diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-05-20 18:41:54 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-05-20 18:41:54 +0300 |
| commit | 5ffc39352ef0195697953e9318b8a17c79e7ae84 (patch) | |
| tree | 0ce445c5268dd34a809d85d0085ce43a8efe3f73 /src/ast.c | |
| parent | 08788af6d50bf3f8a6b69b88a144597c3a997e8b (diff) | |
| download | ek-5ffc39352ef0195697953e9318b8a17c79e7ae84.tar.gz ek-5ffc39352ef0195697953e9318b8a17c79e7ae84.zip | |
document ast.h
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -3027,23 +3027,22 @@ size_t ast_list_len(struct ast_node *node) return count; } -struct ast_node *ast_last_node(struct ast_node *n) +struct ast_node *ast_last_node(struct ast_node *list) { - if (!n) + if (!list) return NULL; - while (n->next) - n = n->next; + while (list->next) + list = list->next; - return n; + return list; } -struct ast_node *ast_block_last(struct ast_node *n) +struct ast_node *ast_block_last(struct ast_node *block) { - struct ast_node *b = ast_last_node(n); + struct ast_node *b = ast_last_node(block); if (b && b->node_type == AST_BLOCK) return ast_block_last(b->_block.body); return b; } - |
