Clang::Cursor(3pm)
π Clang::Cursor
okay so bestie, welcome to the Clang::Cursor page β it's part of the User Contributed Perl Documentation and it lives in section 3 of the manual (that's the 3pm bit, iykyk).
β¨ NAME β¨
Clang::Cursor β it's the Clang cursor class, periodt.
π VERSION π
version 0.09 β yes she's giving vintage, we stan anyway π
π¦ DESCRIPTION π¦
so like. a Clang::Cursor represents an element in the abstract syntax tree of a translation unit. that's it, that's the vibe. every little node in your AST gets to be a Cursor and honestly? main character energy. π
π METHODS π
kind( )
grab the Clang::CursorKind of the cursor you're holding. that's her whole deal. β¨
type( )
gets you the Clang::Type of the entity this cursor is pointing at. π«
spelling( )
returns the name of the entity referenced by the given cursor. so like, the actual written-out identifier. π
num_arguments( )
how many arguments does this cursor reference? this one tells you. no cap. π’
displayname( )
gives you back the display name for the entity the cursor references. yeah it's different from spelling( ), don't ask me why, that's just how it is bestie. π
children( )
retrieves a list of the children of the given cursor. and plot twist β the children are Clang::Cursor objects too. it's a whole family tree, generational, iconic. π³π«Ά
is_pure_virtual( )
figures out whether the given cursor kind represents a pure virtual method. yes/no, that's it. π
is_virtual( )
same energy, different question: does this cursor kind represent a virtual method? πΈ
location( )
gets you the location of the given cursor. and omg she's generous, she returns FIVE values, in this exact order:
- a string with the source file name
- an integer with the initial line number
- an integer with the initial column number
- an integer with the final line number
- another integer with the final column number
five values. hold onto all of them, don't drop any. π
access_specifier( )
retrieves the access of the given cursor. she can return one of these:
invalidpublicprotectedprivate
β οΈ heads up bestie: this only works for C++ code. if you throw a C function at it, it's gonna hand you back invalid and walk away. so don't be surprised, it's not being rude, it's just built like that. π
π AUTHOR π
Alessandro Ghedini <alexbio@cpan.org> β we love a legend. π«Ά
π LICENSE AND COPYRIGHT π
Copyright 2012 Alessandro Ghedini. π
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information. no gatekeeping here. π
and that's the whole page babes β¨ this was perl v5.42.3, dated 2026-09-03, and it's the Clang::Cursor(3pm) manpage signing off π
π mwah, go write some slay code π¦
π¦ where this page comes from
- ubuntu stonking: libclang-perl 0.09-6build9 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms