logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Clang - Perl bindings to the Clang compiler's indexing interface

Author

       Alessandro Ghedini <alexbio@cpan.org>

Description

       Clang is a compiler front end for the C, C++, Objective-C, and Objective-C++ programming languages which
       uses LLVM as its back end.

       This module provides Perl bindings to the Clang indexing interface, used for extracting high-level symbol
       information from source files without exposing the full Clang C++ API.

Name

       Clang - Perl bindings to the Clang compiler's indexing interface

Synopsis

           use Clang;

           my $index = Clang::Index -> new(1);

           my $tunit = $index -> parse('file.c');
           my $nodes = $tunit -> cursor -> children;

           foreach my $node (@$nodes) {
               say $node -> spelling;
               say $node -> kind -> spelling;
           }

Version

       version 0.09

See Also