Skip to content

Support C-Sharp source tracing#34

Merged
patdhlk merged 5 commits into
useblocks:mainfrom
patdhlk:pd-support-c-sharp
Sep 23, 2025
Merged

Support C-Sharp source tracing#34
patdhlk merged 5 commits into
useblocks:mainfrom
patdhlk:pd-support-c-sharp

Conversation

@patdhlk
Copy link
Copy Markdown
Contributor

@patdhlk patdhlk commented Sep 23, 2025

#32

@patdhlk
Copy link
Copy Markdown
Contributor Author

patdhlk commented Sep 23, 2025

@juiwenchen let me know if smth else needs to be done

Copy link
Copy Markdown
Contributor

@juiwenchen juiwenchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

It would be nice to have TCs for C-sharp parser in
https://github.com/useblocks/sphinx-codelinks/blob/main/tests/test_analyse_utils.py

There are TCs for cpp and python as the template. If you don't have enough time for it, I can do it.

Comment thread pyproject.toml Outdated
"typer>=0.16.0",
"click < 8.2", # click 8.2.* produces empty errors if no args are given
"click < 8.2",
# click 8.2.* produces empty errors if no args are given
Copy link
Copy Markdown
Contributor

@juiwenchen juiwenchen Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a unnecessary change, and it's probably autoformatted by your dev tool.

Same for lineno 22 and 26

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think so. This happend when I added treesitter-c-sharp via rye add

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Add tests for c-sharp
Add language-specific node type mapping: created a SCOPE_NODE_TYPES dict that maps
each CommentType to its appropriate AST node type.

Made functions language aware and preserve backwards compatibility with using cpp as the default comment type
@patdhlk patdhlk requested a review from juiwenchen September 23, 2025 14:21
Copy link
Copy Markdown
Contributor

@juiwenchen juiwenchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gooood work! Thanks for your PR

@patdhlk patdhlk merged commit 84b35f0 into useblocks:main Sep 23, 2025
8 checks passed
@patdhlk patdhlk mentioned this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants