[
https://issues.apache.org/jira/browse/LUCY-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marvin Humphrey updated LUCY-16:
--------------------------------
Attachment: 107-arbitrary_type.t
parser_add_arbitrary_type_support.diff
Arbitrary.pm
The "arbitrary" type class is a hack that spares us from having to support C
types with complex declaration syntaxes -- such as unions, structs, enums, or
function pointers -- from within Boilerplater itself.
The only constraint is that the specifier must end in "_t". This allows us
to create complex types in a C header file...
{code:none}
typedef union { float f; int i; } floatint_t;
{code}
... pound-include the C header, then use the resulting typedef in a .bp file
and have it parse as an "arbitrary" type.
{code:none}
floatint_t floatint;
{code}
> Boilerplater::Type::Arbitrary
> -----------------------------
>
> Key: LUCY-16
> URL: https://issues.apache.org/jira/browse/LUCY-16
> Project: Lucy
> Issue Type: Sub-task
> Components: Boilerplater
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Attachments: 107-arbitrary_type.t, Arbitrary.pm,
> parser_add_arbitrary_type_support.diff
>
>
> Support arbitrary types, typically defined via a typedef in a C header file,
> so long
> as the type name ends with "_t".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.