Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating libadalang2xml to 1.0.2. #1001

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions index/li/libadalang2xml/libadalang2xml-1.0.2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name = "libadalang2xml"
description = "Generates XML for Ada source, using libadalang."
long-description = """
Libadalang2XML is a tool to extract syntatic aspects of Ada source code into XML.
The Ada source is initially read using [Libadalang](https://github.com/AdaCore/libadalang). The resulting tree is then traversed, and its structure output in an XML form.
The [document type definition](https://en.wikipedia.org/wiki/Document_type_definition) isn't explicit; it's simply derived from the tree elements created by Libadalang. Note that Libadalang includes much more semantic information than the surface structure generated by this tool, but nevertheless there's enough there to --- for example --- create a scriptable body for a package spec.
## Building on macOS ##
Using the standard `langkit_support`, `libadalang` crates, you **must** build with `LIBRARY_TYPE` set to `relocatable`.
You can obtain versions of those crates adjusted to not require those features, which can therefore build the (default) static libraries, by visiting https://github.com/simonjwright/alire-index.mac.
## Example ##
As an example of the output, this code
``` ada
package Demo is
procedure Square (X : in out Integer);
end Demo;
```
generates
``` xml
<CompilationUnit>
<AdaNodeList/>
<LibraryItem>
<PrivateAbsent/>
<PackageDecl>
<DefiningName>
<Id>Demo</Id>
</DefiningName>
<PublicPart>
<AdaNodeList>
<SubpDecl>
<OverridingUnspecified/>
<SubpSpec>
<SubpKindProcedure>procedure</SubpKindProcedure>
<DefiningName>
<Id>Square</Id>
</DefiningName>
<Params>
<ParamSpecList>
<ParamSpec>
<DefiningNameList>
<DefiningName>
<Id>X</Id>
</DefiningName>
</DefiningNameList>
<AliasedAbsent/>
<ModeInOut>in out</ModeInOut>
<SubtypeIndication>
<NotNullAbsent/>
<Id>Integer</Id>
</SubtypeIndication>
</ParamSpec>
</ParamSpecList>
</Params>
</SubpSpec>
</SubpDecl>
</AdaNodeList>
</PublicPart>
<EndName>
<Id>Demo</Id>
</EndName>
</PackageDecl>
</LibraryItem>
<PragmaNodeList/>
</CompilationUnit>
```
"""
version = "1.0.2"

authors = ["Simon Wright"]
maintainers = ["Simon Wright <[email protected]>"]
maintainers-logins = ["simonjwright"]
licenses = "GPL-3.0-or-later"
website = "https://github.com/simonjwright/libadalang2xml"
tags = ["ada", "xml"]

executables = ["libadalang2xml"]

[build-switches]
development.contracts = "yes"
"*".ada_version = "ada2022"

[[depends-on]]
libadalang = "*"

[origin]
commit = "99ee1dd171cd66736f38e770a751a15ad7ffc334"
url = "git+https://github.com/simonjwright/libadalang2xml.git"

Loading