Bugfix for replacing @0
This commit is contained in:
parent
d3c1526f71
commit
8268e67875
1
Makefile
1
Makefile
@ -43,6 +43,7 @@ clean:
|
||||
rm -f $(NAME) $(OBJFILES)
|
||||
|
||||
test: $(NAME)
|
||||
./$(NAME) Comment -r '[@0]'
|
||||
./$(NAME) -g ./grammars/bp.bp -p Grammar ./grammars/bp.bp
|
||||
|
||||
leaktest: bp
|
||||
|
2
print.c
2
print.c
@ -130,7 +130,7 @@ static void _print_match(FILE *out, printer_t *pr, match_t *m)
|
||||
// Capture substitution
|
||||
if (*r == '@' && r[1] && r[1] != '@') {
|
||||
++r;
|
||||
match_t *cap = get_capture(m, &r);
|
||||
match_t *cap = get_capture(m->children[0], &r);
|
||||
if (cap != NULL) {
|
||||
_print_match(out, pr, cap);
|
||||
if (pr->use_color && current_color != color_replace) {
|
||||
|
Loading…
Reference in New Issue
Block a user