xoofx / xoofx/CppAst.NET

User-defined attributes?

Open
#39 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement PR Welcome
Dominant language
C#
Stars
620
Forks
79
Avg merge
14h 27m
Merged PRs (30d)
1

Description

Does this library supports parsing user-defined C++11 attributes? I was hoping to annotate some of my C++ code with them and generate C# bindings from classes with specific attributes. I just ran a quick test on my code and this library reports no attributes.

https://github.com/DethRaid/SanityEngine/blob/trunk/SanityEngine/src/sanity_engine.hpp#L21 is the class I'm trying to generate bindings for, https://github.com/DethRaid/SanityEngine/blob/trunk/SanityEngine.Codegen.NET/CodegenProgram.cs#L45 is where I'm checking for my attribute.

I've inspected the CppAst.ClassCompilation for my class in the Visual Studio debugger - there's no attributes, or really much of anything. Is there something that's making my class really hard to parse?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked C++ class in SanityEngine/src/sanity_engine.hpp and the attribute check in SanityEngine.Codegen.NET/CodegenProgram.cs. Inspect the CppAst.ClassCompilation result and the parser's handling of C++11 attributes; done means user-defined attributes are available in the parsed AST for the C# generator to detect.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.