Fail on missing closing brackets
This commit is contained in:
parent
fdd2fa7361
commit
de0d20b8f1
|
@ -28,6 +28,10 @@ fn check_brainfuck(prog: &str) -> bool {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if brackets > 0 {
|
||||||
|
println!("Not all brackets have been closed, {} remain open", brackets);
|
||||||
|
borked = true;
|
||||||
|
}
|
||||||
return ! borked;
|
return ! borked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue