Compare commits
No commits in common. "71ee935f7bc939b70fac38b0fe6c7a1f188cd29c" and "5cc866637ef5ba76b3b73dd3dd5dbbf076299b51" have entirely different histories.
71ee935f7b
...
5cc866637e
@ -237,7 +237,7 @@ char* compile(tSyntaxElement* syntaxtree) {
|
||||
|
||||
tSyntaxElement* token = syntaxtree->content.syntax;
|
||||
|
||||
if (strcmp(token->content.string, "#def") == 0) {
|
||||
if (strcmp(token->content.string, "def") == 0) {
|
||||
} else if (strcmp(token->content.string, "set") == 0) {
|
||||
|
||||
compile_enter_tag(&result);
|
||||
|
@ -10,14 +10,9 @@ bool replace(tSyntaxElement* tree, tProcessingData* pd) {
|
||||
|
||||
free(tree->content.none);
|
||||
|
||||
tSyntaxElement* clone = se_clone(pd->data.replace.replacewiththis, tree);
|
||||
tSyntaxElement* clone = se_clone_no_next(pd->data.replace.replacewiththis, tree);
|
||||
tree->content = clone->content;
|
||||
tree->type = clone->type;
|
||||
if (clone->next != NULL) {
|
||||
tSyntaxElement* tmp = se_find_last(clone);
|
||||
tmp->next = tree->next;
|
||||
tree->next = clone->next;
|
||||
}
|
||||
|
||||
free(clone);
|
||||
|
||||
@ -66,7 +61,7 @@ bool process_find(tSyntaxElement* tree, tProcessingData** p_pdata) {
|
||||
|
||||
tSyntaxElement* token = tree->content.syntax;
|
||||
|
||||
if (strcmp(token->content.string,"#def") == 0 &&
|
||||
if (strcmp(token->content.string,"def") == 0 &&
|
||||
token->next != NULL &&
|
||||
token->next->next != NULL) {
|
||||
|
||||
|
10
src/syntax.c
10
src/syntax.c
@ -142,13 +142,3 @@ tSyntaxElement* se_clone_no_next(tSyntaxElement* syntaxelement, tSyntaxElement*
|
||||
return clone;
|
||||
|
||||
}
|
||||
|
||||
tSyntaxElement* se_find_last(tSyntaxElement* syntaxelement) {
|
||||
tSyntaxElement* i = syntaxelement;
|
||||
while (1)
|
||||
if (i->next == NULL)
|
||||
return i;
|
||||
else
|
||||
i = i->next;
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,4 @@ tSyntaxElement* se_clone(tSyntaxElement*, tSyntaxElement*);
|
||||
|
||||
tSyntaxElement* se_clone_no_next(tSyntaxElement*, tSyntaxElement*);
|
||||
|
||||
tSyntaxElement* se_find_last(tSyntaxElement*);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user