In the generated project file, declare that Ada is the only language
used in the project when --no-gdb-hooks is passed (GDB hooks are the
only reason we have a C unit).
TN: R411-040
Until this commit, using this option would make the project_file.mako
template generate invalid GPR syntax: a trailing comma in the aggregate
for the Interfaces project attribute.
In order to fix this, we now compute the list of interfaces in
emitter.py, and just do formatting in the template.
TN: R411-040
The previous commit that removed it was done too quickly: projects
such as GPS need to convert public API values such as analysis contexts
and analysis units to the corresponding C values for its own Python
binding.
Now that we use the same access type for all bare nodes, explicit
conversions are no longer necessary. This commit removes all such
conversions in templates and the facilities to create them in Langkit.
TN: S311-015
This commit changes the representation of bare nodes in the generated
code ($.Implementation). From distinct record types (one per node type),
we switch to a single discriminated record (discriminant is the kind).
In order to preserve separate type names for each node (including
abstract ones), this replaces the previous incompatible access types
with a single access type and one subtype for each node. A dynamic
predicates on all these subtypes allow us to rely on Ada semantics to
check at runtime (iff assertions are enabled) that expected node type
are used (for instance as actuals in function calls).
TN: S311-015
This function will allow us to compute the kind of a node from a dynamic
predicate on bare node access types (i.e. before the Kind field is
available).
TN: S311-015
This makes the generated Ada API more consistent (now *all* nodes have
such a subtype) and will make it easier to write predicates that involve
such nodes.
TN: S311-015
... and use the corresponding field's ".name" property in templates.
Upcoming changes will require this, as the name will no longer be a
constant.
TN: S311-015
The upcoming unification of types for bare nodes requires to have
distinct names for internal property overloads and field accessors. This
renaming decorates names to removes duplicates.
TN: S311-015