-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, The --extras=+z (or --extras=+{nulltag}) option is specified, and The output format supports to emit null tags. The xref and json output formats support to emit null tags. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
20 changed files
with
160 additions
and
2 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,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 |
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
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
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