56 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
ca751250b4 Introduce the lkt_build_and_run test driver
Transition all relevant testcases to it. In the process, port
docstrings/comments from test.py files to expected_concrete_syntax.lkt
(now test.lkt) sources and fix stylechecks issues there.

(cherry picked from commit e1c4fe5804)
2024-11-28 15:40:33 +00:00
Hugo Guerrier
4ac5183991 Melt the Java 'node_identity' test into the 'general' one
(cherry picked from commit f5c19813ee)
2024-11-28 10:04:02 +00:00
Hugo Guerrier
65658e24e3 Melt the Java 'event_handler' test into the 'general' one
(cherry picked from commit 4d573c6a8c)
2024-11-28 10:04:02 +00:00
Hugo Guerrier
5d9539a6bc Melt the Java 'array_exc' test into the 'general' one
(cherry picked from commit 623c051c44)
2024-11-28 10:04:02 +00:00
Hugo Guerrier
302c01e265 Java API: Add member reference in the reflection field structure 2024-07-11 12:13:35 +02:00
Pierre-Marie de Rodat
a1c844d5ee Lkt: remove the root type argument for builtin generic types
For AnalysisUnit and LexicalEnv, there is no type argument left, so they
are not generic types anymore.
2024-07-04 12:37:30 +00:00
Romain Beguet
05362a5e93 Improve style and fix formatting issues in dsl_unparse. 2024-07-03 08:23:35 +00:00
Hugo Guerrier
d030b8bbcf Rename the 'Param' class and remove the 'ParamWithDefaultValue' one
Do this renaming to avoid conflicts with possible "Param" named nodes.
Remove 'ParamWithDefaultValue' because it is unnecessary.
2024-06-28 09:51:15 +00:00
Pierre-Marie de Rodat
ec4872e418 Lkt: change naming convention for token names for lower to camel
This makes the convention consistent with the DSL, and avoids
workarounds for conflicts with Lkt keywords: in Libadalang, the Null
token can stay Null, instead of null_tok (no API breakage needed).
2024-06-28 08:41:26 +00:00
Pierre-Marie de Rodat
52ed5ff98a Lkt: rename @use_in_equality to @used_in_equality 2024-06-19 10:18:02 +00:00
Pierre-Marie de Rodat
dca25f78d6 Lkt: rename @has_abstract_list to @with_abstract_list 2024-06-19 10:18:02 +00:00
Pierre-Marie de Rodat
eb36d66f4f Lkt: rename @export to @exported 2024-06-19 10:18:02 +00:00
Hugo Guerrier
5b5d8c6cc4 Add array of primitive types support 2024-05-30 13:40:35 +00:00
Remi SEGARD
c38005ad64 Fix style 2024-04-29 13:06:05 +00:00
Remi SEGARD
feb171e7a3 Java: change AnalysisContext.getDiagnostic return type to array 2024-04-29 13:06:05 +00:00
Remi SEGARD
53c9cd8763 Turn array wrapping into a utility 2024-04-29 13:06:05 +00:00
Remi SEGARD
e97200a407 Java bindings: improve generation of array types 2024-04-29 13:06:05 +00:00
Hugo Guerrier
faedfbe1a0 Remove the old and new rewriting contexts equivalence test
This test fails sometimes because it makes no sense at all. There is no
information about rewriting context being equivalent when closing and
reopening a new one (see doc for 'langkit.rewriting.start_rewriting').
2024-04-11 15:44:58 +02:00
Hugo Guerrier
577a999b96 Bind the rewriting API in Java 2024-04-03 14:31:47 +02:00
Hugo Guerrier
64e93d667d Fill 'fieldNames' node attribute with lower-cased names of fields
This formatting is required by the LKQL engine, which needs to know the
lower-cased names of a node's fields in order to construct it.
2024-04-03 12:53:43 +02:00
Hugo Guerrier
81191d866c Add a node description class to store all information about a node kind
This class helps centralize information about nodes.
2024-04-03 12:53:43 +02:00
Hugo Guerrier
3e32d6ca1e Wrap node types struct fields in their Java Classes
Before this commit, node typed structure fields were stored as is in
Java structure wrapping classes. Entities were 'Entity' and bare node
were 'PointerWrapper'.
Now, those fields are stored as '<my_lang>Node' in their Java wrapping
classes.
2024-04-03 09:41:17 +00:00
Raphaël AMIARD
c9d78f71dc Adapt symbol representation: store reference to symbol table
That'll allow us to go from (thin_symbol, sym_table) to symbol, and vice
versa, where with the old representation there was no other way to go
from symbol to thin than redoing a full-lookup.

That'll help us transition to thin-symbol storage everywhere.
2024-03-22 09:42:03 +01:00
Hugo Guerrier
2ca1204d49 Correct 'AnalysisUnit.equals' method
Before this commit, in the 'AnalysisUnit.equals' method, the other value
was compared with itself, resulting in the method returning always true.
Now 'other' is compared to 'this'.
2024-03-11 14:52:31 +00:00
Hugo Guerrier
f4904d0996 minor: Refactor 'Token.equals' operands order
For consistency reasons, move 'this' to the LHS and 'other' to
the RHS in 'Token.equals' method.
2024-03-11 14:52:31 +00:00