Update a1/program.c
This commit is contained in:
parent
c3c2e52c68
commit
18dec4857d
@ -35,7 +35,7 @@ void check_brackets(const char *code) {
|
|||||||
// Якщо закрита дужка
|
// Якщо закрита дужка
|
||||||
else if (c == ')' || c == '}' || c == ']' || c == '>') {
|
else if (c == ')' || c == '}' || c == ']' || c == '>') {
|
||||||
if (stack_top < 0) {
|
if (stack_top < 0) {
|
||||||
printf("Unexpected closing bracket %c at position %d\n", c, i);
|
printf("Unexpected closing bracket %c in %d\n", c, i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char top = stack[stack_top--];
|
char top = stack[stack_top--];
|
||||||
|
Loading…
Reference in New Issue
Block a user