<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <dl style="line-height: 1.5; margin-left: 2em">
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
      <dd style="margin-left: 8.5em">Kouhei Sutou &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2012-08-03 22:33:29 +0900 (Fri, 03 Aug 2012)</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
      <dd style="margin-left: 8.5em"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844">bc11ffbb75fc226d03029a28c4d66fa412138844</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em">q: support unterminated phrase check</pre></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#diff-0">lib/q-translator.js</a></li>
          <li><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#diff-1">test/q-translator.test.js</a></li>
        </ul>
      </dd>
    </dl>

    <div class="diff-section" style="clear: both">
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: lib/q-translator.js (+7 -3)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L54">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L55">55</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L57">57</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L58">58</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L61">61</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L75">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L76">76</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L77">77</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L78">78</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L79">79</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L80">80</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L81">81</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L82">82</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0L83">83</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R54">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R55">55</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R57">57</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R61">61</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R75">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R76">76</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R77">77</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R78">78</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R79">79</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R80">80</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R81">81</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R82">82</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R83">83</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R84">84</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R85">85</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R86">86</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L0R87">87</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -55,7 +55,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">QueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">       }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       phrase += character;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    this.throwTranslateError(&quot;phrase is unterminated&quot;);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    this.throwTranslateError(&quot;phrase is unterminated: &lt;&quot; + phrase + &quot;&gt;&quot;);</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   },</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   translateTerm: function() {</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     this.skipSpaces(this.query, this);</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -76,8 +76,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">QueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     var message = &quot;&quot;;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     message += &quot;&lt;&quot;;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     message += this.query.substring(0, this.offset);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    message += &quot;|&quot; + this.query[this.offset] + &quot;|&quot;;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-    message += this.query.substring(this.offset + 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    if (this.offset == this.query.length) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      message += &quot;||&quot;;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    } else {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      message += &quot;|&quot; + this.query[this.offset] + &quot;|&quot;;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      message += this.query.substring(this.offset + 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     message += &quot;&gt;&quot;;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     message += &quot;: &quot; + detail;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     throw new Error(message);</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: test/q-translator.test.js (+4 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L97">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L98">98</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L99">99</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L100">100</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L101">101</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L102">102</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1L103">103</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R97">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R98">98</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R99">99</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R100">100</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R101">101</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R102">102</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R103">103</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R104">104</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R105">105</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R106">106</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/bc11ffbb75fc226d03029a28c4d66fa412138844#L1R107">107</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -98,6 +98,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">suite('QueryTranslator', function() {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">                       'star wars&quot;',</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                       '|s|tar wars&quot;',</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                       &quot;phrase must start with &lt;\&quot;&gt;&quot;);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  testPhraseTermError(&quot;not terminated&quot;,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                      '&quot;star wars',</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                      '&quot;star wars||',</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+                      &quot;phrase is unterminated: &lt;star wars&gt;&quot;);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   testTerm(&quot;a term&quot;,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">            &quot;  star wars&quot;,</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>