Provide option for parsing function bodies
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 620
- Forks
- 79
- Avg merge
- 14h 27m
- Merged PRs (30d)
- 1
Description
Hi there, I'm trying to use CppAst.NET to parse metal-cpp header files, which are a wrapper of the Objective-C API. The underlying Objective-C functions being called are contained within a macro within the function body.
To generate valid C# code, I need to be able to access the string used to generate the selector inside the function bodies, however currently, function body parsing is disabled.
Could an option be added to enable function body parsing? I'm happy to PR it myself, however, I don't know what other modifications would be required.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/CppAst/CppParser.cs at the function-body parsing setting around line 113, then trace how parsed function bodies and macros are represented. Add an option that lets callers enable body parsing and expose the selector string needed by metal-cpp consumers; done means the option works without changing the default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp, objective-c
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100