-
Notifications
You must be signed in to change notification settings - Fork 640
SQL: make foreign tags for 'interenal' functions #4240
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
SQL: make foreign tags for 'interenal' functions #4240
Conversation
ead1102
to
0b2c35a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4240 +/- ##
==========================================
+ Coverage 85.98% 86.01% +0.02%
==========================================
Files 249 249
Lines 64102 64119 +17
==========================================
+ Hits 55121 55154 +33
+ Misses 8981 8965 -16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8af995c
to
af013a5
Compare
af013a5
to
38ce2d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for creating foreign tags for PostgreSQL functions declared with LANGUAGE 'internal'
or LANGUAGE internal
. When such functions are encountered, the SQL parser now creates a foreign reference tag in the C language for the internal function name specified in the AS
clause.
Key Changes:
- SQL parser now recognizes both quoted and unquoted
'internal'
language declarations - Internal function names (e.g.,
int8lt
) are tagged as C function foreign calls - New
foreigncall
role added to C parser's function kind
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
parsers/sql.c | Adds logic to detect LANGUAGE 'internal' and create foreign C function tags; accepts both quoted and unquoted identifiers for language names |
parsers/cxx/cxx_tag.h | Defines new CXXTagFUNCTIONRoleFOREIGNCALL enum value |
parsers/cxx/cxx_tag.c | Adds foreigncall role definition for C functions |
parsers/cxx/cxx.c | Bumps C parser version from 1.1 to 2.2 |
man/ctags-lang-c.7.rst.in | Documents the new foreigncall role in C parser changelog |
docs/man/ctags-lang-c.7.rst | Generated documentation for the new role |
Units/parser-sql.r/sql_pgSQL_with_language_internal.d/input.sql | Test input with PostgreSQL internal functions |
Units/parser-sql.r/sql_pgSQL_with_language_internal.d/expected.tags | Expected output showing C foreign call tags |
Units/parser-sql.r/sql_pgSQL_with_language_internal.d/args.ctags | Test configuration enabling reference tags |
Units/parser-sql.r/funcions.d/expected.tags | Updated test expectations with new tag extras |
Units/parser-sql.r/funcions.d/args.ctags | Added --extras=+g flag to test configuration |
Tmain/version-option.d/stdout-expected.txt | Updated C parser version from 1.1 to 2.2 |
Tmain/nested-subparsers.d/stdout-expected.txt | Updated C function kind version from 1 to 2 |
Tmain/list-roles.d/stdout-expected.txt | Added foreigncall role entries throughout test output |
Tmain/list-kinds-full.d/stdout-expected.txt | Updated C function kind version from 1 to 2 |
Tmain/json-output-format.d/stdout-expected.txt | Updated parser version and added foreigncall role description |
Tmain/extras-field-for-pseudo-tags.d/stdout-expected.txt | Added foreigncall role description pseudo-tags |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Now we have version information for each kind, role, field, and extra. So the Changes section of the man pages is redundant. |
Signed-off-by: Masatake YAMATO <[email protected]>
Update the C parser version to 2.2. Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: Masatake YAMATO <[email protected]>
38ce2d0
to
94a2a2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This change extracts
int8lt
as a function in the C language.