<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">This patch addresses the 2 formatting
      issues below.<br>
      <br>
      On 7/1/12 11:48 PM, Manuel Klimek wrote:<br>
    </div>
    <blockquote
cite="mid:CAOsfVvkA5r-1QP-AkEApL=gE=27zd0uVKvpo8UgTrQs5VSMwoQ@mail.gmail.com"
      type="cite">
      <div>+        lib.clang_tokenize(tu, extent, byref(tokens_memory),</div>
      <div>+                byref(tokens_count))</div>
      <div><br>
      </div>
      <div>Strange indent. Hm, after reading further I see that that
        kind of indent is quite common. Is there a guideline for how to
        indent this?</div>
      <div><br>
      </div>
      <div>
        <div>+    @staticmethod</div>
        <div>+    def register(value, name):</div>
        <div>+        """Register a new TokenKind enumeration.</div>
        <div>+</div>
        <div>+This should only be called at module load time by code
          within this</div>
        <div>+package.</div>
        <div>+"""</div>
      </div>
      <div><br>
      </div>
      <div>Indent.</div>
      <div><br>
      </div>
      <div>
        <div>--- /dev/null</div>
        <div>+++ b/bindings/python/clang/enumerations.py</div>
      </div>
      <div>
        <div><br>
        </div>
        <div>+TokenKinds = [</div>
        <div>+    ('PUNCTUATION', 0),</div>
        <div>+    ('KEYWORD', 1),</div>
        <div>+    ('IDENTIFIER', 2),</div>
        <div>+    ('LITERAL', 3),</div>
        <div>+    ('COMMENT', 4),</div>
        <div>+]</div>
      </div>
      <div><br>
      </div>
      <div>This doesn't seem to match the comment. Those "TokenKinds"
        are different from what I see in clang/Basic/TokenKinds.def. Am
        I missing something?</div>
      <div><br>
      </div>
      <div>Cheers,</div>
      <div>
        /Manuel</div>
      <div><br>
        On Sat, Jun 30, 2012 at 4:16 AM, Gregory Szorc <span dir="ltr"><<a
            moz-do-not-send="true" href="mailto:gregory.szorc@gmail.com"
            target="_blank">gregory.szorc@gmail.com</a>></span>
        wrote:</div>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Updated
          patch attached.<br>
          <br>
          * Added Cursor.get_tokens()<br>
          * Refactored TokenGroup out of TranslationUnit to support
          above<br>
          * Refactored with TranslationUnit.get_* API changes from last
          patch.<br>
          <div class="HOEnZb">
            <div class="h5"><br>
              On Fri, Jun 29, 2012 at 12:18 AM, Gregory Szorc <<a
                moz-do-not-send="true"
                href="mailto:gregory.szorc@gmail.com">gregory.szorc@gmail.com</a>>
              wrote:<br>
              > This exposes all of libclang's token functions in the
              Python bindings.<br>
              ><br>
              > I'm putting the TokenKind enumerations in a new
              module,<br>
              > clang.enumerations. I plan to eventually move all
              existing<br>
              > enumerations there so they are all consolidated. And,
              maybe one day,<br>
              > we can even generate that file automatically by
              parsing the libclang<br>
              > header files. I know Anders has code around somewhere
              that does<br>
              > this...<br>
              ><br>
              > ---<br>
              >  bindings/python/clang/cindex.py                    |
              177 +++++++++++++++++++--<br>
              >  bindings/python/clang/enumerations.py              |
               32 ++++<br>
              >  bindings/python/tests/cindex/test_token_kind.py    |
               43 +++++<br>
              >  bindings/python/tests/cindex/test_tokens.py        |
               52 ++++++<br>
              >  .../python/tests/cindex/test_translation_unit.py   |
               24 ++-<br>
              >  5 files changed, 312 insertions(+), 16 deletions(-)<br>
              >  create mode 100644
              bindings/python/clang/enumerations.py<br>
              >  create mode 100644
              bindings/python/tests/cindex/test_token_kind.py<br>
              >  create mode 100644
              bindings/python/tests/cindex/test_tokens.py<br>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          cfe-commits mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
          <a moz-do-not-send="true"
            href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits"
            target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
          <br>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>