Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
hui1601 committed Sep 19, 2023
1 parent 5cb7875 commit 70ec1b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@ ast_node *parse(const char *text, const size_t text_size) {
// copy start syntax to buf
memcpy(str_buf, current_syntax->start, strlen(current_syntax->start));
str_buf_size += strlen(current_syntax->start);
ast_node* parent = node_stack->data[node_stack->size - 1];
// remove current node from node_stack
ast_node_remove_child(node_stack->data[node_stack->size - 1],
((ast_node *) node_stack->data[node_stack->size - 1])->children_size - 1);
ast_node_remove_child(parent,parent->children_size - 1);
// change current node
current_node = stack_pop(node_stack);
}
Expand Down

0 comments on commit 70ec1b6

Please sign in to comment.