4
This commit is contained in:
parent
9244a1e7da
commit
b262b92ddd
@ -31,7 +31,7 @@ void check_brackets(const char *code) {
|
||||
}
|
||||
else if (ch == ')' || ch == '}' || ch == ']' || ch == '>') {
|
||||
if (top == -1) {
|
||||
printf("Unmatched closing bracket %c at position %d\n", ch, i);
|
||||
printf("Unexpected closing bracket %c in %d\n", ch, i);
|
||||
return;
|
||||
}
|
||||
if (!is_matching_pair(stack[top], ch)) {
|
||||
@ -65,5 +65,4 @@ int main() {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user