This commit is contained in:
Deinerovych 2024-10-29 15:07:18 +01:00
parent e9f90ba3d1
commit a8d85d812d

View File

@ -46,8 +46,7 @@ void check_brackets(const char *code) {
} }
if (top != -1) { if (top != -1) {
printf("Unmatched opening bracket %c at position %d, expected %c\n", printf("Missing closing brackets: %c\n",
stack[top], positions[top],
stack[top] == '(' ? ')' : stack[top] == '(' ? ')' :
stack[top] == '{' ? '}' : stack[top] == '{' ? '}' :
stack[top] == '[' ? ']' : '>'); stack[top] == '[' ? ']' : '>');