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

Add support for include_directive in C #46

Open
gkorland opened this issue Jan 2, 2025 · 0 comments · May be fixed by #57
Open

Add support for include_directive in C #46

gkorland opened this issue Jan 2, 2025 · 0 comments · May be fixed by #57
Labels
enhancement New feature or request

Comments

@gkorland
Copy link
Contributor

gkorland commented Jan 2, 2025

Should create an edge between two files

#include <stdio.h>
#include "myheader.h"
(preprocessor_directive
  (include_directive
    (angle_bracketed_include
      (string_literal) ; `<stdio.h>`
    )
  )
)
(preprocessor_directive
  (include_directive
    (quoted_include
      (string_literal) ; `"myheader.h"`
    )
  )
)
@gkorland gkorland added the enhancement New feature or request label Jan 2, 2025
gkorland added a commit that referenced this issue Jan 2, 2025
Fixes #46

Add support for processing `include_directive` in C files.

* **api/analyzers/c/analyzer.py**
  - Add `process_include_directive` method to handle `include_directive` nodes and create edges between files.
  - Modify `first_pass` method to process `include_directive` nodes and create edges between files.

* **tests/test_c_analyzer.py**
  - Add test case to verify the creation of edges between files for `include_directive`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/FalkorDB/code-graph-backend/issues/46?shareId=XXXX-XXXX-XXXX-XXXX).
@gkorland gkorland linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant