-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
In Python I can do this:
class_reduction_v2 = ClassDef(
name="ReductionV2",
bases=[],
keywords=[],
body=[
Expr(value=set_value("foo")),
Assign(targets=[Name(id="AUTO", ctx=Store())], value=set_value("auto")),
Assign(targets=[Name(id="NONE", ctx=Store())], value=set_value("none")),
Assign(targets=[Name(id="SUM", ctx=Store())], value=set_value("sum")),
Assign(
targets=[Name(id="SUM_OVER_BATCH_SIZE", ctx=Store())],
value=set_value("sum_over_batch_size"),
),
],
decorator_list=[],
)Which produces:
class ReductionV2:
""" foo """
AUTO = 'auto'
NONE = 'none'
SUM = 'sum'
SUM_OVER_BATCH_SIZE = 'sum_over_batch_size'Looks like neither LLVM LibTooling nor LLVM libclang have support for this:
https://discourse.llvm.org/t/create-and-emit-ast-for-struct-clang-recorddecl/61383
Is this something you would consider adding to Psyche-C? 🥇
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels