Commits

Sebastien Binet  committed 71170d2

more cursor api + new token

  • Participants
  • Parent commits 00ce0cd

Comments (0)

Files changed (1)

File pkg/clang/token.go

 	 * \brief A comment.
 	 */
 	TK_Comment = C.CXToken_Comment
-)
+)
+
+// Token is a single preprocessing token.
+type Token struct {
+	c C.CXToken
+}
+
+// Kind determines the kind of this token
+func (t Token) Kind() TokenKind {
+	o := C.clang_getTokenKind(t.c)
+	return TokenKind(o)
+}
+
+// EOF