Esempio n. 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()
}
Esempio n. 2
0
/**
 * \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()
}