-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: resolve real kinds for tags with unknown kinds when a hint fi…
…le is given As the first pass, make a tags file with --fields=+{language}. In the second pass, specified the tags file created in the first pass with --_hint=<tags file>. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
8 changed files
with
155 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This must be fixed | ||
--_hint=Units/parser-python.r/resolve-unknown-kind.d/hint.tags | ||
|
||
--extras=+r | ||
--fields=+rEK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
C0 input.py /^from mymod0 import C0$/;" class module:mymod0 roles:imported extras:reference | ||
f0 input.py /^from mymod0 import f0$/;" function module:mymod0 roles:imported extras:reference | ||
mymod0 input.py /^from mymod0 import C0$/;" module roles:namespace extras:reference | ||
mymod0 input.py /^from mymod0 import f0$/;" module roles:namespace extras:reference | ||
mymod0 input.py /^from mymod0 import v0$/;" module roles:namespace extras:reference | ||
v0 input.py /^from mymod0 import v0$/;" variable module:mymod0 roles:imported extras:reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# u-ctags -o hint.tags --options=hint.ctags mymod0.py | ||
--sort=no | ||
--fields=+{language} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ | ||
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ | ||
!_TAG_PROGRAM_AUTHOR Universal Ctags Team // | ||
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
!_TAG_PROGRAM_VERSION 5.9.0 /8ca48ff0/ | ||
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ | ||
!_TAG_OUTPUT_FILESEP slash /slash or backslash/ | ||
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ | ||
!_TAG_PROC_CWD /home/jet/var/ctags/Units/parser-python.r/resolve-unknown-kind.d/ // | ||
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ | ||
C0 mymod0.py /^class C0:$/;" c language:Python | ||
f0 mymod0.py /^ def f0(self):$/;" m language:Python class:C0 | ||
f0 mymod0.py /^def f0():$/;" f language:Python | ||
v0 mymod0.py /^v0 = 1$/;" v language:Python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from mymod0 import C0 | ||
from mymod0 import f0 | ||
from mymod0 import v0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class C0: | ||
def f0(self): | ||
pass | ||
|
||
def f0(): | ||
pass | ||
|
||
v0 = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters