Skip to content

Commit a5766c0

Browse files
authored
Update Scraper Docs (#1015)
1 parent 585a0bd commit a5766c0

File tree

1 file changed

+7
-4
lines changed
  • documentation/for-contributors/generators

1 file changed

+7
-4
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Scraper
22

3-
The scraper calls into clang to generate XML and can scrape this XML for Symbols of the [Symbol Layer](./symbol-layer/README.md)
3+
The Scraper will call into ClangSharp to generate XML from the given C headers (`GenerateXML`), and then convert the output produced by ClangSharp into symbols defined by the [Symbol Layer](./symbol-layer/README.md) (`ScrapeXML`).
4+
5+
The Scraper should stay quite small and easy to use, as it is also the window to all the complexity that comes from C++, Clang, header, etc. It should only bridge the XML output into the symbol layer.
46

57
## Scraping XML
68

79
To scrape XML there is a visitor that visits each XML node and outputs several symbols per node.
8-
This is what happens in `XmlVisitor.cs`
10+
This is what happens in `XmlVisitor.cs`, called from `ScrapeXML`.
911

10-
## Generating XML using clang
12+
## Generating XML using ClangSharp
1113

12-
This is what happens in `ClangScraper.cs`, which is configured using `ClangScraperConfiguration.cs`
14+
This is what happens in `ClangScraper.cs`, which is configured using `ClangScraperConfiguration.cs`.
15+
The XML is generated by the `ClangSharp.PInvokeGenerator` see [dotnet/ClangSharp](https://github.com/dotnet/ClangSharp) and the [PInvokeGenerator file](https://github.com/dotnet/ClangSharp/blob/main/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs).
1316
Check XML docs for details on what methods do.

0 commit comments

Comments
 (0)