Moved brace matching functionality to use the new syntax tree

We do not generate missing tokens, so the length check is not necessary.