forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request universal-ctags#4152 from masatake/nulltag
main: add nulltag/z, a new extra
- Loading branch information
Showing
46 changed files
with
420 additions
and
60 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
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
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 @@ | ||
0 |
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,7 @@ | ||
# Copyright: 2024 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
CTAGS=$1 | ||
|
||
$CTAGS --quiet --options=NONE --machinable --with-list-header \ | ||
--list-output-formats | grep -v '^json' |
Empty file.
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 @@ | ||
#OFORMAT DEFAULT AVAILABLE NULLTAG | ||
e-ctags no yes no | ||
etags no yes no | ||
u-ctags yes yes no | ||
xref no yes yes |
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 @@ | ||
Z | ||
z | ||
|
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,30 @@ | ||
# Copyright: 2024 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
CTAGS=$1 | ||
|
||
. ../utils.sh | ||
|
||
# The order of stdout and stderr lines is not stable. | ||
exit_if_win32 "$CTAGS" | ||
|
||
# is_feature_available $CTAGS json | ||
|
||
O="--options=NONE --language-force=CTagsSelfTest" | ||
|
||
for fmt in xref; do | ||
echo "# no extra ($fmt)" | ||
${CTAGS} $O -o - --output-format="$fmt" input.cst 2>&1 | ||
|
||
echo "# drop '0' extra ($fmt)" | ||
${CTAGS} $O -o - --output-format="$fmt" --extras=-z input.cst 2>&1 | ||
|
||
echo "# drop '{nulltag}' extra ($fmt)" | ||
${CTAGS} $O -o - --output-format="$fmt" --extras=-'{nulltag}' input.cst 2>&1 | ||
|
||
echo '# with --extras=+0 ($fmt)' | ||
${CTAGS} $O -o - --output-format="$fmt" --extras=+z input.cst 2>&1 | ||
|
||
echo "# with --extras=+{nulltag}' ($fmt)" | ||
${CTAGS} $O -o - --output-format="$fmt" --extras=+'{nulltag}' input.cst 2>&1 | ||
done | sed -e 's/\.exe//' |
Empty file.
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,17 @@ | ||
# no extra (xref) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
# drop '0' extra (xref) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
# drop '{nulltag}' extra (xref) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
# with --extras=+0 ($fmt) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
emitNullTag 2 input.cst z | ||
# with --extras=+{nulltag}' (xref) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
emitNullTag 2 input.cst z |
4 changes: 4 additions & 0 deletions
4
Units/parser-javascript.r/js-extract-empty-property-in-json.d/args.ctags
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,4 @@ | ||
--sort=no | ||
--extras=+{nulltag} | ||
--fields=+{extras} | ||
--output-format=json |
2 changes: 2 additions & 0 deletions
2
Units/parser-javascript.r/js-extract-empty-property-in-json.d/expected.tags-json
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,2 @@ | ||
{"_type": "tag", "name": "", "path": "input.js", "pattern": "/^var variable = { \"\": \"value\" };$/", "kind": "property", "scope": "variable", "scopeKind": "variable", "extras": "nulltag"} | ||
{"_type": "tag", "name": "variable", "path": "input.js", "pattern": "/^var variable = { \"\": \"value\" };$/", "kind": "variable"} |
1 change: 1 addition & 0 deletions
1
Units/parser-javascript.r/js-extract-empty-property-in-json.d/features
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 @@ | ||
json |
1 change: 1 addition & 0 deletions
1
Units/parser-javascript.r/js-extract-empty-property-in-json.d/input.js
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 @@ | ||
var variable = { "": "value" }; |
5 changes: 5 additions & 0 deletions
5
Units/parser-javascript.r/js-extract-empty-property.d/args.ctags
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 @@ | ||
--sort=no | ||
--extras=+{nulltag} | ||
--fields=+{extras} | ||
-x | ||
--_xformat=%-16N %-10K %4n input.js %C |
2 changes: 2 additions & 0 deletions
2
Units/parser-javascript.r/js-extract-empty-property.d/expected.tags-x
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,2 @@ | ||
property 1 input.js var variable = { "": "value" }; | ||
variable variable 1 input.js var variable = { "": "value" }; |
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 @@ | ||
var variable = { "": "value" }; |
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 @@ | ||
--sort=no |
1 change: 1 addition & 0 deletions
1
Units/parser-javascript.r/js-skip-empty-property.d/expected.tags
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 @@ | ||
variable input.js /^var variable = { "": "value" };$/;" v |
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 @@ | ||
var variable = { "": "value" }; |
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.