10058 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
9a6e8f33e8 Merge branch 'mr/pmderodat/gdb-standalone' into 'master'
GDB helpers: fix support for standalone libraries

Closes #995

See merge request eng/libadalang/langkit!1518
2026-02-12 15:03:47 +00:00
Pierre-Marie de Rodat
db8c410e47 GDB helpers: fix support for standalone libraries 2026-02-12 14:40:46 +00:00
Pierre-Marie de Rodat
4eb7586200 Merge branch 'mr/pmderodat/lkt-modules' into 'master'
Liblktlang: add handling of multiple modules in `import ...` clauses, and support for the revamped module system

Closes #981

See merge request eng/libadalang/langkit!1508
2026-02-12 12:21:22 +00:00
Pierre-Marie de Rodat
5a1ee73a26 Liblktlang: fix handling of property references with module prefixes 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
7235199b71 lkt_toolbox: hide type info for modules (always null) 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
d674f8ab4d Liblktlang: override referenced_decl for ImportedId
Also extend lkt_toolbox to exercise it.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
5ff4e084d7 Enhance lkt_toolbox to exercise ModuleId.referenced_decl
Also extend lkt_toolbox to exercise it.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
96adb4a586 Liblktlang: add missing handling of type references with module prefixes 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
1256e7a69f Liblktlang: fix semantic analysis for user-provided Metadata types 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
11c587138e Lkt frontend: update to the new prelude getters 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
842c61c9f1 Regenerate bootstrap sources 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
c7bc0ca99c Liblktlang: rework properties used to handle prelude entities
Move/rename `LangkitRoot.fetch_prelude` to `LktNode.prelude_unit` so
that this property is easily available from all nodes and so that its
name is more "getter-like".

Also introduce the `LktNode.is_from_prelude` to simplify the codebase.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
d04dc81e22 Liblktlang: minor refactoring 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
615bdc3b4f Liblktlang: add support for the revamped module system 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
df0ce00bfa Liblktlang: do not assume that the root scope is the env for unit roots
Upcoming work to correctly analyze Lkt modules will introduce one env
for each Lkt module (i.e. for each analysis unit root node): look for
prelude declarations in the root scope directly, and insert "magic"
types (the root node, Metadata) to it.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
556e670d30 Liblktlang: make LangkitRoot derive Decl
`LangkitRoot` nodes now define modules, so they must be treated as
declarations for these modules. This is necessary for the semantic
analysis to allow named references to Lkt modules.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
3fb9baf1b7 lkt/lsp/decl_details/test.py: minor refactoring 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
db18c38155 lkt/lsp/complete: sort completion results
Currently, the order of items returned by `LktNode.p_complete` is not
significant and depends deeply on implementation details. Sort its
result so that baselines are more resilient to changes in the
implementation of completion.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
29ec593a46 Lkt frontend: add handling of multiple modules in import ... clauses 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
15745870c3 Lkt: regenerate bootstrap sources 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
a0f8539c0c Lkt: allow multiple modules for each import ... clause
It was not allowed so far because of an oversight in the recent revamp
of the module system.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
58598281ed lkt_toolbox: make it possible to extend Lkt lookup path on the cmd line 2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
09dfe3691c lkt_toolbox: add code completion capabilities
This will make it easier to debug code completion features from
Liblktlang.
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
135ef70c12 manage.py: use default formatting for errors
For interactive uses, the `gnu-full` style is much less convenient than
the default format (colors, true column number, quoted source with
caret, ...).
2026-02-12 11:48:42 +00:00
Pierre-Marie de Rodat
967577513e lkt_toolbox: widen use of P_Custom_Image to all identifiers
There is no reason to restrict it to `Ref_Id` nodes, since this property
is defined on `Id` itself.
2026-02-12 11:48:42 +00:00