Handbook
Glossary
with-cursor-tokens ( cursor quot: ( tu token -- obj ) -- seq )
Vocabulary
libclang
Inputs
cursor
an
object
quot
a
quotation
with stack effect
( tu token -- obj )
Outputs
seq
an
object
Definition
USING:
kernel
libclang.ffi
sequences
;
IN:
libclang
::
with-cursor-tokens
( cursor quot: ( tu token -- obj ) -- seq )
cursor
clang_Cursor_getTranslationUnit
:>
tu tu cursor
clang_getCursorExtent
clang-tokenize
:>
( tokens ntokens )
tu tokens
CXToken
ntokens
ptr-array>array
[
clang_getTokenSpelling
clang-get-cstring
]
with
map
tu tokens ntokens
clang_disposeTokens
;
inline