Handbook
Glossary
cursor-visitor ( -- callback )
Vocabulary
libclang
Inputs
None
Outputs
callback
an
object
Definition
USING:
combinators
discord
kernel
libclang.ffi
math.parser
sequences
;
IN:
libclang
:
cursor-visitor
( -- callback )
[
2drop
dup
clang_getCursorKind
{
{
CXCursor_Namespace
[
drop
CXChildVisit_Recurse
]
}
{
CXCursor_FunctionDecl
[
cursor>c-function
CXChildVisit_Continue
]
}
{
CXCursor_TypedefDecl
[
cursor>c-typedef
CXChildVisit_Continue
]
}
{
CXCursor_UnionDecl
[
cursor>c-union
CXChildVisit_Continue
]
}
{
CXCursor_StructDecl
[
cursor>c-struct
CXChildVisit_Continue
]
}
{
CXCursor_EnumDecl
[
cursor>enum
CXChildVisit_Continue
]
}
{
CXCursor_VarDecl
[
drop
CXChildVisit_Continue
]
}
{
CXCursor_FieldDecl
[
cursor>c-field
CXChildVisit_Continue
]
}
{
CXCursor_EnumConstantDecl
[
[
~quotation~
with-cursor-tokens
first
]
[
clang_getEnumConstantDeclUnsignedValue
number>string
]
bi
<c-field>
push-child-form
CXChildVisit_Continue
]
}
{
CXCursor_UnexposedDecl
[
drop
CXChildVisit_Continue
]
}
[
"cursor-visitor unhandled: "
gwrite
dup
g...
gflush
2drop
CXChildVisit_Recurse
]
}
case
]
CXCursorVisitor
gflush
;