-
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, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
- Loading branch information
Showing
16 changed files
with
115 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,39 @@ | ||
# Copyright: 2022 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
CTAGS=$1 | ||
|
||
. ../utils.sh | ||
|
||
# is_feature_available $CTAGS json | ||
|
||
O="--options=NONE --language-force=CTagsSelfTest" | ||
|
||
for fmt in u-ctags; 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=-0 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=+0 input.cst | ||
} 2>&1 | ||
|
||
{ | ||
echo "# with --extras=+{nulltag}' ($fmt)" | ||
${CTAGS} $O -o - --output-format="$fmt" --extras=+'{nulltag}' input.cst | ||
} 2>&1 | ||
|
||
done |
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 (u-ctags) | ||
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 (u-ctags) | ||
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 (u-ctags) | ||
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) | ||
input.cst /^z$/;" z | ||
# with --extras=+{nulltag}' (u-ctags) | ||
ctags: Notice: No options will be read from files or environment | ||
ctags: Notice: ignoring null tag in input.cst(line: 1, language: CTagsSelfTest) | ||
input.cst /^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
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