Merge the @external, @uses_envs and @uses_entity_info annotations into a
single one: @external(uses_envs=true, uses_entity_info=true). This makes
sense, as uses_envs and uses_entity_info are never legal for
non-external properties.
With the current low-tech approach to typing/validity checking for Lkt,
it is not possible to infer whether N designates a bare node type or an
entity type. Introduce a different syntax for entity types to avoid this
problem.
By default, make App instances print parsing errors for all requested
units on the standard output, and let subclasses override this behavior
if needed.
Also extend the Python playground so that parsing errors fit nicely into
the prompt header.
Add flushing close to places that deal with exceptions so that the order
of lines in the output reflect the order of execution for the
corresponding print statements.
The actual buffering behavior differs depending on the Python
interpreter version used, which led to spurious diffs with older
versions.
TN: W306-034
Depending on the Python interpreter version that is used to exercise
generated libraries, the line number, and thus the quoted line of source
code that is present in baselines can vary. Introduce an output refiner
to hide these discrepancies and use them in tests where it is relevant.
TN: W306-034
Since the analysis context initialization may trigger events (e.g.
"prelude file parsed"), language bindings (in particular Python) may
need to create/register their wrapper around the context that is just
created so that they can use that wrapper when invoking the callback.
Having allocation and initialization as a single atomic step makes this
impossible: this change splits them in the C API and update the
Python/OCaml bindings to allow this.
TN: VA12-016
Public APIs are supposed to expose entities as black boxes: there is no
concept of bare node, there. For this reason, it makes no sense to have
two distinct "repr"/"image" primitives for them. Remove the existing
"entity_repr" primitive and make "node_repr" use the entity info for its
work.
For #639
It may be interesting for file readers to return both decoded contents
and also diagonstics, for example when doing error recovery while
transcoding the source buffer.
The Read primitives currently does not allow this: Contents is
considered uninitialized when Diagnostics is not empty. Always expect
Contents to be initialized instead to support this case.
TN: VA17-001