title: get matching bracket on ace js editor
body: <p>Is there a way to get the position of the matching bracket on ace js editor?</p>
  
  <p>So let's say that I am iterating through the lines and tokens like this</p>
  
  <pre><code>var editor = ace.edit("editor");
  var session = editor.getSession();
  for(var i = 0; i &lt; session.getLength(); i++){
     var tokens = session.getTokens(i);
     for(var j=0;j&lt;thisTokens.length; j++){
         if(tokens[j].value == '{'){
             // how to get position of the closing bracket here?
         }
     }
  }
  </code></pre>
  
  <p>I notice that ace has this
  <a href="https://github.com/ajaxorg/ace/blob/master/lib/ace/edit_session/bracket_match.js" rel="nofollow noreferrer">https://github.com/ajaxorg/ace/blob/master/lib/ace/edit_session/bracket_match.js</a></p>
  
  <p>but I am just not so sure on how to utilize it. It's not in the API documentation.</p>