File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ typedef struct {
4646
4747#define VEC_POP (vec ) \
4848 { \
49- STRING_FREE(VEC_BACK(vec).custom_tag_name); \
49+ if (VEC_BACK(vec).type == CUSTOM) { \
50+ tag_free(&VEC_BACK(vec)); \
51+ } \
5052 (vec).len--; \
5153 }
5254
@@ -62,9 +64,7 @@ typedef struct {
6264#define VEC_CLEAR (vec ) \
6365 { \
6466 for (int i = 0; i < (vec).len; i++) { \
65- if ((vec).data[i].type == CUSTOM) { \
66- STRING_FREE((vec).data[i].custom_tag_name); \
67- } \
67+ tag_free(&(vec).data[i]); \
6868 } \
6969 (vec).len = 0; \
7070 }
@@ -320,8 +320,6 @@ bool scan_start_tag_name(Scanner *scanner, TSLexer *lexer) {
320320 return false;
321321 }
322322 Tag tag = for_name (tag_name .data );
323- if (tag .type == CUSTOM ) {
324- }
325323 VEC_PUSH (scanner -> tags , tag );
326324 switch (tag .type ) {
327325 case SCRIPT :
You can’t perform that action at this time.
0 commit comments