示例#1
0
/*
	Determine the spelling of the given token.

	The spelling of a token is the textual representation of that token, e.g.,
	the text of an identifier or keyword.
*/
func (tu TranslationUnit) TokenSpelling(t Token) string {
	o := cxstring{C.clang_getTokenSpelling(tu.c, t.c)}
	defer o.Dispose()

	return o.String()
}
示例#2
0
文件: token.go 项目: zimmski/go-clang
/**
 * \brief Determine the spelling of the given token.
 *
 * The spelling of a token is the textual representation of that token, e.g.,
 * the text of an identifier or keyword.
 */
func (tu TranslationUnit) TokenSpelling(tok Token) string {
	cstr := cxstring{C.clang_getTokenSpelling(tu.c, tok.c)}
	defer cstr.Dispose()
	return cstr.String()
}