XSBuil...Source(3pm)

πŸ“¦
version 0.28 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

NAME πŸ’–

hey bestie!! welcome to XSBuil...Source(3pm) from User Contributed Perl Documentation πŸ’… this page is all about:

ExtUtils::XSBuilder::ParseSource - parse C source files


DESCRIPTION ✨

for the full tea, see ExtUtils::XSBuilder 🫢


πŸ¦‹ extent_parser (o) πŸ¦‹

okay so this one lets you call the Extent or Replace method of the parser to add new syntax rules πŸ”₯ mainly useful to include expansions for preprocessor macros. periodt.

πŸ“ preprocess (o) πŸ“

this lets you preprocess the source before it is given to the parser ✨ you may modify the source, which is given as first argument in place. lowkey powerful.

🌸 include_dirs (o) 🌸

returns a reference to the list of directories that should be searched for include files which contain the functions, structures, etc. to be extracted πŸ’–

Default: '.'

🌈 include_paths (o) 🌈

returns a reference to a list of directories that are given as include directories to the C compiler. this is mainly used to strip these directories from filenames to convert absolute paths to relative paths.

Default: empty list ([])

πŸ‘‘ unwanted_includes (o) πŸ‘‘

returns a reference to a list of include files that should not be processed πŸ™ˆ

Default: empty list ([])

πŸ’… sort_includes (o, include_list) πŸ’…

passed an array ref of include files, it lets you define the sort order, so includes are processed correctly ✨

Default: return the passed array reference.

🧚 find_includes (o) 🧚

returns a list of include files to be processed.

Default: search directories given by include_dirs for all files and build a list of include files. All files starting with a word matched by unwanted_includes are not included in the list.

πŸ”₯ handle_define (o) πŸ”₯

passed a hash ref with the definition of a define, may modify it. return false to discard it, return true to keep it.

Default: 1

πŸ’œ handle_enum (o) πŸ’œ

passed a hash ref with the definition of a enum value, may modify it. return false to discard it, return true to keep it.

Default: 1

πŸŽ€ handle_struct (o) πŸŽ€

passed a hash ref with the definition of a struct, may modify it. return false to discard it, return true to keep it.

Default: 1

⭐ handle_function (o) ⭐

passed a hash ref with the definition of a function, may modify it. return false to discard it, return true to keep it.

Default: 1

πŸ¦‹ handle_callback (o) πŸ¦‹

passed a hash ref with the definition of a callback, may modify it. return false to discard it, return true to keep it.

Default: 1

πŸ’– package (o) πŸ’–

return package name for tables

Default: 'MY'

🌸 targetdir (o) 🌸

return name of target directory where to write tables

Default: './xsbuilder/tables'

πŸ’… run πŸ’…

call this class method to parse your source. before you can do so you must provide a class that overrides the defaults in ExtUtils::XSBuilder::ParseSource. after that you scan the source files with:

MyClass -> run ;

this was perl v5.36.0, dated 2022-11-19, and the page is XSBuil...Source(3pm) πŸ’– mwah! slay.

πŸ“¦ where this page comes from