|
1 | 1 | #include "liquid.h" |
2 | 2 | #include "block.h" |
3 | 3 | #include "intutil.h" |
4 | | -//#include "tokenizer.h" |
5 | 4 | #include "stringutil.h" |
6 | 5 | #include "vm.h" |
7 | 6 | #include "variable.h" |
@@ -107,13 +106,6 @@ static int is_id(int c) |
107 | 106 | return rb_isalnum(c) || c == '_'; |
108 | 107 | } |
109 | 108 |
|
110 | | -void print_pointer(char* start, char* end) { |
111 | | - while(start < end) { |
112 | | - printf("%c", *start++); |
113 | | - } |
114 | | - printf("\n"); |
115 | | -} |
116 | | - |
117 | 109 | static tag_markup_t internal_block_body_parse(block_body_t *body, parse_context_t *parse_context) |
118 | 110 | { |
119 | 111 | tokenizer_t *tokenizer = parse_context->tokenizer; |
@@ -219,12 +211,6 @@ static tag_markup_t internal_block_body_parse(block_body_t *body, parse_context_ |
219 | 211 | break; |
220 | 212 | } |
221 | 213 |
|
222 | | - if ((name_len == 4 && strncmp(name_start, "else", 4) == 0) || (name_len == 5 && strncmp(name_start, "endif", 5) == 0)) { |
223 | | - VALUE str = rb_enc_str_new(name_start, name_len, utf8_encoding); |
224 | | - unknown_tag = (tag_markup_t) { str, str }; |
225 | | - goto loop_break; |
226 | | - } |
227 | | - |
228 | 214 | const char *markup_start = read_while(name_end, end, rb_isspace); |
229 | 215 | VALUE markup = rb_enc_str_new(markup_start, end - markup_start, utf8_encoding); |
230 | 216 | VALUE tag_name = rb_enc_str_new(name_start, name_end - name_start, utf8_encoding); |
@@ -318,8 +304,6 @@ tag_markup_t parse_if_tag(VALUE markup, block_body_t *body, parse_context_t *par |
318 | 304 | VALUE condition_obj = parse_single_binary_comparison(markup); |
319 | 305 | vm_assembler_add_op_with_constant(body_code, condition_obj, OP_EVAL_CONDITION); |
320 | 306 |
|
321 | | - uint8_t* instruction; |
322 | | - |
323 | 307 | ptrdiff_t exit_branches[10]; |
324 | 308 | ptrdiff_t* exit_start = exit_branches; |
325 | 309 | ptrdiff_t* exit_end = exit_branches; |
|
0 commit comments