Skip to content

Commit ebc90c2

Browse files
authored
Merge pull request #3582 from masatake/parser-versioning
main: parser versioning
2 parents 67ad22e + a7a649d commit ebc90c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+279
-14
lines changed

Tmain/extras-field-for-pseudo-tags.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ run_ctags()
1010
--fields=E --extras=p \
1111
--pseudo-tags=-TAG_PROGRAM_VERSION \
1212
--pseudo-tags=-TAG_PROC_CWD \
13+
--pseudo-tags=-TAG_PARSER_VERSION \
1314
$@ \
1415
-o - input.c
1516
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Copyright: 2022 Masatake YAMATO
3+
# License: GPL-2
4+
5+
CTAGS=$1
6+
7+
${CTAGS} --quiet --options=NONE --langdef=TEST'{version=10.9}' --version=TEST

Tmain/flags-langdef-version.d/stderr-expected.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parser/TEST: 10.9

Tmain/input-encoding-option.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then
1919
--pseudo-tags=-TAG_EXTRA_DESCRIPTION \
2020
--pseudo-tags=-TAG_FIELD_DESCRIPTION \
2121
--pseudo-tags=-TAG_ROLE_DESCRIPTION \
22+
--pseudo-tags=-TAG_PARSER_VERSION \
2223
--input-encoding=utf-8 --input-encoding-java=shift_jis --input-encoding-javascript=euc-jp \
2324
-o ${BUILDDIR}/tags \
2425
input.js input.java ; then

Tmain/json-output-format.d/stdout-expected.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
{"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "m,member", "pattern": "class members"}
8383
{"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "v,variable", "pattern": "variables"}
8484
{"_type": "ptag", "name": "TAG_OUTPUT_EXCMD", "path": "mixed", "pattern": "number, pattern, mixed, or combineV2"}
85+
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "C", "path": "0.0", "pattern": "current.age"}
86+
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Go", "path": "0.0", "pattern": "current.age"}
87+
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Man", "path": "0.0", "pattern": "current.age"}
88+
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Python", "path": "0.0", "pattern": "current.age"}
8589
{"_type": "ptag", "name": "TAG_PATTERN_LENGTH_LIMIT", "path": "96", "pattern": "0 for no limit"}
8690
{"_type": "ptag", "name": "TAG_PROGRAM_AUTHOR", "path": "Universal Ctags Team", "pattern": ""}
8791
{"_type": "ptag", "name": "TAG_PROGRAM_NAME", "path": "Universal Ctags", "pattern": "Derived from Exuberant Ctags"}

Tmain/list-pseudo-tags.d/stdout-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ TAG_KIND_SEPARATOR off the separators used in kinds
99
TAG_OUTPUT_EXCMD on the excmd: number, pattern, mixed, or combine
1010
TAG_OUTPUT_FILESEP on the separator used in file name (slash or backslash)
1111
TAG_OUTPUT_MODE on the output mode: u-ctags or e-ctags
12+
TAG_PARSER_VERSION on the version of the parser (current.age)
1213
TAG_PATTERN_LENGTH_LIMIT on the limit of pattern length
1314
TAG_PROC_CWD on the current working directory of the tags generator
1415
TAG_PROGRAM_AUTHOR on the author of this ctags implementation

Tmain/output-encoding-option.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if ${CTAGS} --quiet --options=NONE --list-features | grep -q iconv; then
1818
--pseudo-tags=-TAG_FIELD_DESCRIPTION \
1919
--pseudo-tags=-TAG_EXTRA_DESCRIPTION \
2020
--pseudo-tags=-TAG_ROLE_DESCRIPTION \
21+
--pseudo-tags=-TAG_PARSER_VERSION \
2122
--output-encoding=shift_jis --input-encoding=utf-8 --input-encoding-javascript=euc-jp \
2223
-o ${BUILDDIR}/tags \
2324
input.js input.java ; then

Tmain/ptag-kind-sep.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ ${CTAGS} --quiet --options=NONE -o - \
1717
--pseudo-tags=-TAG_FIELD_DESCRIPTION \
1818
--pseudo-tags=-TAG_EXTRA_DESCRIPTION \
1919
--pseudo-tags=-TAG_ROLE_DESCRIPTION \
20+
--pseudo-tags=-TAG_PARSER_VERSION \
2021
input.php

0 commit comments

Comments
 (0)