Skip to content

Commit

Permalink
remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
damnMeddlingKid committed Mar 1, 2022
1 parent fa6d193 commit 9639195
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ instruments*.trace
*.cpu
*.object
*.dSYM
.vscode/
vendor/
8 changes: 0 additions & 8 deletions ext/liquid_c/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,6 @@ static tag_markup_t internal_block_body_parse(block_body_t *body, parse_context_
break;
}

if ((name_len == 4 && strncmp(name_start, "else", 4) == 0) || (name_len == 5 && strncmp(name_start, "endif", 5) == 0)) {
VALUE str = rb_enc_str_new(name_start, name_len, utf8_encoding);
unknown_tag = (tag_markup_t) { str, str };
goto loop_break;
}

const char *markup_start = read_while(name_end, end, rb_isspace);
VALUE markup = rb_enc_str_new(markup_start, end - markup_start, utf8_encoding);
VALUE tag_name = rb_enc_str_new(name_start, name_end - name_start, utf8_encoding);
Expand Down Expand Up @@ -318,8 +312,6 @@ tag_markup_t parse_if_tag(VALUE markup, block_body_t *body, parse_context_t *par
VALUE condition_obj = parse_single_binary_comparison(markup);
vm_assembler_add_op_with_constant(body_code, condition_obj, OP_EVAL_CONDITION);

uint8_t* instruction;

ptrdiff_t exit_branches[10];
ptrdiff_t* exit_start = exit_branches;
ptrdiff_t* exit_end = exit_branches;
Expand Down

0 comments on commit 9639195

Please sign in to comment.