17 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
433fe6c7b2 Bind target information type and primitives to the Python API 2024-10-15 13:49:57 +00:00
Pierre-Marie de Rodat
e7e53514f6 Python API: bind Libadalang.Config_Pragmas.Set_Mappings 2023-08-14 08:35:57 +00:00
Pierre-Marie de Rodat
50b77375a0 App: add a new --subproject command line option
This new argument allows to control the Projects argument in
Libadalang.Project_Provider.Source_Files (Ada) and libadalang.App
(Python).
2023-04-05 08:27:03 +00:00
Pierre-Marie de Rodat
c07158bfb0 Python API: synchronize sources selection options with Ada's App 2023-04-05 08:26:13 +00:00
Pierre-Marie de Rodat
8a1335ac4f Python API: fix App.default_get_files when no GPR file is given 2023-04-05 08:24:06 +00:00
Pierre-Marie de Rodat
5e960a4981 App: rename the --exit-on-missing-file command line argument
TN: VB23-023
2023-02-08 13:18:04 +00:00
Pierre-Marie de Rodat
9738808ec4 Python API: make App warn about missing source files
TN: VA12-016
2022-11-23 10:55:33 +00:00
Pierre-Marie de Rodat
eab5ae7a8b Python API: fix charset handling for UnitProvider.auto
The low level function accepts a ctypes.c_char_p, which requires a bytes
instance, so users passing a str will get a TypeError exception. Use
the dedicated _unwrap_charset function to run the automatic conversion
in this case.

TN: VB02-014
2022-11-04 15:41:02 +00:00
Pierre-Marie de Rodat
a0f2f34ae7 Python API: fix UnitProvider.auto
The recent refactoring for GPR projects handling (#932) broke this
function. Do what is necessary to fix it.

TN: VB02-014
2022-11-04 15:41:02 +00:00
Raphaël AMIARD
4b08e4b57f lal.App: Allow automatic discovery of sources
Via the GPRProject.source_files API. Closes #938
2022-11-03 09:51:50 +00:00
Pierre-Marie de Rodat
3c61ecd198 Python API: expose error messages from GPR project files
TN: VA14-036
2022-10-19 12:02:24 +00:00
Pierre-Marie de Rodat
b8d5e16c38 Python API: rework GPR projects handling
This commit introduces a new class that represents a loaded project
(GPRProject), created from the usual project loading arguments (project
file, scenario variables, target and RTS info). This new class provides
two methods: create_unit_provider(project=None) to create a unit
provider wrapping a project and source_files(mode) to query the list of
source files in a project.

It also removes the now obsolete SourceFiles class (recently added), but
preserves the UnitProvider.for_project method to avoid breaking existing
user code (been there for several years).

Closes #932
2022-07-18 13:14:27 +02:00
Pierre-Marie de Rodat
8fa693200b Python App extensions: remove an unused import
For #932
2022-07-18 13:14:27 +02:00
Pierre-Marie de Rodat
ab61a07468 Add support for preprocessing
This commit introduces a new public package (Libadalang.Preprocessing)
to provide GNATprep-compatible preprocessing features, including a file
reader that preprocesses files. It also adds a small C/Python binding
layer for this file reader, and extends the User Manual to describe this
feature.

TN: V117-037
2022-03-14 14:24:59 +00:00
Pierre-Marie de Rodat
a2295945d5 Python bindings: remove support for Python2
TN: U720-016
2021-09-24 15:54:39 +02:00
Pierre-Marie de Rodat
3b2cc33db3 Project provider: introduce dedicated exception and clarify doc
This commit also switches custom exception to Langkit's new mechanism to
handle these automatically in all language bindings.

TN: U518-009
2021-06-23 17:09:59 +02:00
Pierre-Marie de Rodat
4382a22f9c Reorganize the source tree
Move most of "ada/*" to the root directory (this makes sense, as this
repository has been dedicated to Libadalang for years), and rename
"ada/language" to "ada".

TN: T914-010
2020-11-02 16:51:46 +01:00