Much saner bracket detection in a single pass
Extended bracket detection to var ... in|;