Skip to content

Commit

Permalink
Merge pull request #67 from dolik-rce/missing-colon
Browse files Browse the repository at this point in the history
Fix typo in dump_node
  • Loading branch information
arithy authored Aug 30, 2022
2 parents 739b3ee + e56b504 commit b128a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/packcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ static void dump_node(context_t *ctx, const node_t *node, const int indent) {
fprintf(stdout, "')\n");
break;
case NODE_QUANTITY:
fprintf(stdout, "%*sQuantity(min:%d, max%d) {\n", indent, "", node->data.quantity.min, node->data.quantity.max);
fprintf(stdout, "%*sQuantity(min:%d, max:%d) {\n", indent, "", node->data.quantity.min, node->data.quantity.max);
dump_node(ctx, node->data.quantity.expr, indent + 2);
fprintf(stdout, "%*s}\n", indent, "");
break;
Expand Down
6 changes: 3 additions & 3 deletions tests/dump.d/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rule(name:'statement', ref:0, vars.len:1, capts.len:0, codes.len:2) {
)
}
Sequence(max:4, len:3) {
Quantity(min:0, max-1) {
Quantity(min:0, max:-1) {
Sequence(max:2, len:2) {
Predicate(neg:1) {
Reference(var:'(null)', index:void, name:'EOL', rule:'EOL')
Expand Down Expand Up @@ -125,7 +125,7 @@ Rule(name:'primary', ref:1, vars.len:1, capts.len:1, codes.len:2) {
Alternate(max:2, len:2) {
Sequence(max:2, len:2) {
Capture(index:0) {
Quantity(min:1, max-1) {
Quantity(min:1, max:-1) {
Charclass(value:'0-9')
}
}
Expand All @@ -146,7 +146,7 @@ Rule(name:'primary', ref:1, vars.len:1, capts.len:1, codes.len:2) {
}
}
Rule(name:'_', ref:14, vars.len:0, capts.len:0, codes.len:0) {
Quantity(min:0, max-1) {
Quantity(min:0, max:-1) {
Charclass(value:' \t')
}
}
Expand Down

0 comments on commit b128a77

Please sign in to comment.