Commit Graph

15 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
eb36d66f4f Lkt: rename @export to @exported 2024-06-19 10:18:02 +00:00
Pierre-Marie de Rodat
1ffd449060 langkit.dsl_unparse: rework empty lines emitted for properties 2023-12-13 13:55:11 +00:00
Pierre-Marie de Rodat
f4e0349e71 Testsuite: switch as many tests as possible to types_from_lkt=True 2023-12-13 13:55:10 +00:00
Pierre-Marie de Rodat
f75832df8a langkit.dsl_unparse: minor style tweaks 2023-12-13 13:55:06 +00:00
Pierre-Marie de Rodat
58c90019ed Lkt: use Entity[N] to designate the entity type for the N node type
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.
2023-12-13 13:36:31 +00:00
Pierre-Marie de Rodat
7698a8d111 dsl_unparse: remove spurious line break in grammars
For GitLab issue #612
2022-05-17 11:52:36 +02:00
Pierre-Marie de Rodat
11ab0daea6 dsl_unparse: add an empty line after import statements
This makes the output sources more readable.

For GitLab issue #612
2022-05-17 11:52:36 +02:00
Pierre-Marie de Rodat
0a9619bf83 Python API: fix unwrapping of arrays of structs
Unwrapping an array of structs is meant to take the ownership share for
these structs, and thus to clear them. This means that the destructor of
Python wrappers for structs must handle the case where they no longer
have the ownership of a struct value: they didn't so far, which
triggered crashes.

TN: UA05-027
2021-10-18 11:46:46 +02:00
Pierre-Marie de Rodat
96537fe65f dsl_unparse + testsuite: reformat according to the new Lkt coding style
TN: U923-014
2021-10-13 10:29:57 +02:00
Laurent Thévenoux
042d578dd5 U920-002: avoid mismatched type error on root node
As the LexicalEnv.get method always return an array of root nodes
while the root node is defined in user code, we need to turn the Node
and LexicalEnv classes into generic traits and instantiate them using
the actual root node.

To make this works, root node declaration has to be changed from
`class FooNode : Node` to `class FooNode implements Node[FooNode]`,
which required to refactor a bit almost all the lkt tests.
2021-09-27 17:39:36 +02:00
Raphaël AMIARD
3eef9cdc25 RA22-015: make Node a base class rt. a trait 2020-06-30 15:43:53 +02:00
Raphaël AMIARD
119379f643 RA22-015 dsl_unparse: Unparse @with_lexer annotation 2020-06-30 15:43:53 +02:00
Raphaël AMIARD
2060a7c36d RA22-015: make token_node/root_node traits 2020-06-16 15:19:35 +02:00
Pierre-Marie de Rodat
2b9b33d6a0 Remove __future__ imports and adjust stylechecks
TN: T511-017
2020-05-26 12:33:48 +02:00
Pierre-Marie de Rodat
f352c7a361 Python API: do not dec_ref C array values when coming from struct fields
TN: T423-042
2020-04-28 11:48:45 +02:00