Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions Tmain/extra-long.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# resetting
F fileScope FALSE Include tags of file scope
f inputFile FALSE Include an entry for the base file name of every input file
p pseudo FALSE Include pseudo tags
q qualified FALSE Include an extra class-qualified tag entry for each tag
r reference FALSE Include reference tags
s subparser TRUE Include tags generated by sub parsers
F fileScope FALSE tags of file scope
f inputFile FALSE entry for the base file name of every input file
p pseudo FALSE pseudo tags
q qualified FALSE extra class-qualified tag entry for each tag
r reference FALSE reference tags
s subparser TRUE tags generated by sub parsers
# enabling 1
F fileScope TRUE Include tags of file scope
f inputFile FALSE Include an entry for the base file name of every input file
p pseudo TRUE Include pseudo tags
q qualified FALSE Include an extra class-qualified tag entry for each tag
r reference FALSE Include reference tags
s subparser FALSE Include tags generated by sub parsers
F fileScope TRUE tags of file scope
f inputFile FALSE entry for the base file name of every input file
p pseudo TRUE pseudo tags
q qualified FALSE extra class-qualified tag entry for each tag
r reference FALSE reference tags
s subparser FALSE tags generated by sub parsers
# disabling 1
F fileScope FALSE Include tags of file scope
f inputFile FALSE Include an entry for the base file name of every input file
p pseudo FALSE Include pseudo tags
q qualified FALSE Include an extra class-qualified tag entry for each tag
r reference FALSE Include reference tags
s subparser FALSE Include tags generated by sub parsers
F fileScope FALSE tags of file scope
f inputFile FALSE entry for the base file name of every input file
p pseudo FALSE pseudo tags
q qualified FALSE extra class-qualified tag entry for each tag
r reference FALSE reference tags
s subparser FALSE tags generated by sub parsers
# combination
F fileScope FALSE Include tags of file scope
f inputFile TRUE Include an entry for the base file name of every input file
p pseudo FALSE Include pseudo tags
q qualified FALSE Include an extra class-qualified tag entry for each tag
r reference TRUE Include reference tags
s subparser FALSE Include tags generated by sub parsers
F fileScope FALSE tags of file scope
f inputFile TRUE entry for the base file name of every input file
p pseudo FALSE pseudo tags
q qualified FALSE extra class-qualified tag entry for each tag
r reference TRUE reference tags
s subparser FALSE tags generated by sub parsers
# combination with letters
F fileScope FALSE Include tags of file scope
f inputFile FALSE Include an entry for the base file name of every input file
p pseudo TRUE Include pseudo tags
q qualified TRUE Include an extra class-qualified tag entry for each tag
r reference TRUE Include reference tags
s subparser FALSE Include tags generated by sub parsers
F fileScope FALSE tags of file scope
f inputFile FALSE entry for the base file name of every input file
p pseudo TRUE pseudo tags
q qualified TRUE extra class-qualified tag entry for each tag
r reference TRUE reference tags
s subparser FALSE tags generated by sub parsers
24 changes: 12 additions & 12 deletions Tmain/list-extra.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#LETTER NAME ENABLED DESCRIPTION
F fileScope TRUE Include tags of file scope
f inputFile TRUE Include an entry for the base file name of every input file
p pseudo TRUE Include pseudo tags
q qualified TRUE Include an extra class-qualified tag entry for each tag
r reference TRUE Include reference tags
s subparser TRUE Include tags generated by sub parsers
F fileScope TRUE tags of file scope
f inputFile TRUE entry for the base file name of every input file
p pseudo TRUE pseudo tags
q qualified TRUE extra class-qualified tag entry for each tag
r reference TRUE reference tags
s subparser TRUE tags generated by sub parsers
#LETTER NAME ENABLED DESCRIPTION
F fileScope TRUE Include tags of file scope
f inputFile TRUE Include an entry for the base file name of every input file
p pseudo TRUE Include pseudo tags
q qualified TRUE Include an extra class-qualified tag entry for each tag
r reference TRUE Include reference tags
s subparser TRUE Include tags generated by sub parsers
F fileScope TRUE tags of file scope
f inputFile TRUE entry for the base file name of every input file
p pseudo TRUE pseudo tags
q qualified TRUE extra class-qualified tag entry for each tag
r reference TRUE reference tags
s subparser TRUE tags generated by sub parsers
10 changes: 5 additions & 5 deletions Tmain/list-fields-with-prefix.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
r UCTAGSrole off NONE TRUE Role
Z UCTAGSscope off NONE TRUE Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
E UCTAGSextra off NONE TRUE Extra tag type information
x UCTAGSxpath off NONE TRUE xpath for the tag
p UCTAGSscopeKind off NONE TRUE Kind of scope as full name
r UCTAGSrole off NONE TRUE role
Z UCTAGSscope off NONE TRUE include the "scope:" key in scope field (use s) in tags output, scope name in xref output
E UCTAGSextra off NONE TRUE extra tag type information
x UCTAGSxpath off NONE TRUE XPath for the tag
p UCTAGSscopeKind off NONE TRUE kind of scope as full name
e UCTAGSend off NONE TRUE end lines of various items
- UCTAGSproperties off C TRUE properties (static, inline, mutable,...)
- UCTAGSproperties off C++ TRUE properties (static, inline, mutable,...)
Expand Down
36 changes: 18 additions & 18 deletions Tmain/list-fields.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ N name on NONE TRUE tag name (fixed field)
F input on NONE TRUE input file (fixed field)
P pattern on NONE TRUE pattern (fixed field)
C compact off NONE TRUE compact input line (fixed field, only used in -x option)
a access off NONE TRUE Access (or export) of class members
f file on NONE TRUE File-restricted scoping
i inherits off NONE TRUE Inheritance information
K NONE off NONE TRUE Kind of tag as full name
k NONE on NONE TRUE Kind of tag as a single letter
l language off NONE TRUE Language of input file containing tag
m implementation off NONE TRUE Implementation information
n line off NONE TRUE Line number of tag definition
S signature off NONE TRUE Signature of routine (e.g. prototype or parameter list)
s NONE on NONE TRUE Scope of tag definition (`p' can be used for printing its kind)
t typeref on NONE TRUE Type and name of a variable or typedef
z kind off NONE TRUE Include the "kind:" key in kind field (use k or K) in tags output, kind full name in xref output
r role off NONE TRUE Role
R NONE off NONE TRUE Marker (R or D) representing whether tag is definition or reference
Z scope off NONE TRUE Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
E extra off NONE TRUE Extra tag type information
x xpath off NONE TRUE xpath for the tag
p scopeKind off NONE TRUE Kind of scope as full name
a access off NONE TRUE access (or export) of class members
f file on NONE TRUE file-restricted scoping
i inherits off NONE TRUE inheritance information
K NONE off NONE TRUE kind of tag as full name
k NONE on NONE TRUE kind of tag as a single letter
l language off NONE TRUE language of input file containing tag
m implementation off NONE TRUE implementation information
n line off NONE TRUE line number of tag definition
S signature off NONE TRUE signature of routine (e.g. prototype or parameter list)
s NONE on NONE TRUE scope of tag definition (`p' can be used for printing its kind)
t typeref on NONE TRUE type and name of a variable or typedef
z kind off NONE TRUE include the "kind:" key in kind field (use k or K) in tags output, kind full name in xref output
r role off NONE TRUE role
R NONE off NONE TRUE marker (R or D) representing whether tag is definition or reference
Z scope off NONE TRUE include the "scope:" key in scope field (use s) in tags output, scope name in xref output
E extra off NONE TRUE extra tag type information
x xpath off NONE TRUE XPath for the tag
p scopeKind off NONE TRUE kind of scope as full name
e end off NONE TRUE end lines of various items
- properties off C TRUE properties (static, inline, mutable,...)
- properties off C++ TRUE properties (static, inline, mutable,...)
Expand Down
16 changes: 8 additions & 8 deletions Tmain/list-pseudo-tags.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
JSON_OUTPUT_VERSION the version of json output stream format off
TAG_FILE_FORMAT the version of tags file format on
JSON_OUTPUT_VERSION version of json output stream format off
TAG_FILE_FORMAT version of tags file format on
TAG_FILE_SORTED how tags are sorted on
TAG_PROGRAM_AUTHOR the author of this ctags implementation on
TAG_PROGRAM_NAME the name of this ctags implementation on
TAG_PROGRAM_URL the official site URL of this ctags implementation on
TAG_PROGRAM_VERSION the version of this ctags implementation on
TAG_KIND_SEPARATOR the separators used in kinds off
TAG_KIND_DESCRIPTION the letters, names and descriptions of kinds in a parser off
TAG_PROGRAM_AUTHOR author of this ctags implementation on
TAG_PROGRAM_NAME name of this ctags implementation on
TAG_PROGRAM_URL official site URL of this ctags implementation on
TAG_PROGRAM_VERSION version of this ctags implementation on
TAG_KIND_SEPARATOR separators used in kinds off
TAG_KIND_DESCRIPTION letters, names and descriptions of kinds in a parser off
28 changes: 28 additions & 0 deletions Tmain/lowercase-descriptions.d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright: 2016 Doug Kearns
# License: GPL-2

# PURPOSE: descriptions in --list-* output should generally be lowercase but
# may be incidentally capitalised if they start with a proper name or acronym.

CTAGS=$1

is_capitalised_description()
{
awk --field-separator='\t' '$NF ~ /^[[:upper:]]/'
}

echo '# --list-extra'
${CTAGS} --quiet --options=NONE --machinable --with-list-header=no \
--list-extra | is_capitalised_description

echo '# --list-fields'
${CTAGS} --quiet --options=NONE --machinable --with-list-header=no \
--list-fields | is_capitalised_description

echo '# --list-kinds-full'
${CTAGS} --quiet --options=NONE --machinable --with-list-header=no \
--list-kinds-full | is_capitalised_description

echo '# --list-pseudo-tags'
${CTAGS} --quiet --options=NONE --with-list-header=no \
--list-pseudo-tags | is_capitalised_description
10 changes: 10 additions & 0 deletions Tmain/lowercase-descriptions.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --list-extra
# --list-fields
x xpath off NONE TRUE XPath for the tag
# --list-kinds-full
HTML f function on FALSE 0 JavaScript functions
Protobuf r rpc off FALSE 0 RPC methods
SQL x mltable on FALSE 0 MobiLink table scripts
SQL y mlconn on FALSE 0 MobiLink conn scripts
SQL z mlprop on FALSE 0 MobiLink properties
# --list-pseudo-tags
4 changes: 2 additions & 2 deletions Tmain/wildcard-in-lang-of-fields-option.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
S signature on NONE TRUE Signature of routine (e.g. prototype or parameter list)
t typeref off NONE TRUE Type and name of a variable or typedef
S signature on NONE TRUE signature of routine (e.g. prototype or parameter list)
t typeref off NONE TRUE type and name of a variable or typedef
2 changes: 1 addition & 1 deletion Tmain/xformat-and-parser-own-field.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ subsection reStructuredText
#
# LIST: ENABLING COMMON FIELD BY SPECIFYING WILDCARD
#
l language on NONE TRUE Language of input file containing tag
l language on NONE TRUE language of input file containing tag
58 changes: 29 additions & 29 deletions Units/review-needed.r/1795612.js.t/input.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
// This file should generate the following tags:
// classes
// Test.RPC
// methods
// Test.RPC.asyncMethod
// Test.RPC.asyncRequest
// properties
// Test.RPC.request_id
Test.RPC =
{
request_id: 0,
asyncRequest: function(
/* string */ uri,
/* object */ data,
/* object */ callback)
{
},
asyncMethod: function(
/* string */ uri,
/* string */ method,
/* array */ params,
/* object */ callback)
{
}
};

// This file should generate the following tags:
// classes
// Test.RPC
// methods
// Test.RPC.asyncMethod
// Test.RPC.asyncRequest
// properties
// Test.RPC.request_id
Test.RPC =
{
request_id: 0,

asyncRequest: function(
/* string */ uri,
/* object */ data,
/* object */ callback)
{
},

asyncMethod: function(
/* string */ uri,
/* string */ method,
/* array */ params,
/* object */ callback)
{
}
};

36 changes: 18 additions & 18 deletions main/field.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,65 +104,65 @@ static fieldSpec fieldSpecsExuberant [] = {

/* EXTENSION FIELDS */
DEFINE_FIELD_SPEC_FULL ('a', "access", FALSE,
"Access (or export) of class members",
"access (or export) of class members",
renderFieldAccess, isAccessFieldAvailable),
DEFINE_FIELD_SPEC_FULL ('f', "file", TRUE,
"File-restricted scoping",
"file-restricted scoping",
renderFieldFile, isFileFieldAvailable),
DEFINE_FIELD_SPEC_FULL ('i', "inherits", FALSE,
"Inheritance information",
"inheritance information",
renderFieldInherits, isInheritsFieldAvailable),
DEFINE_FIELD_SPEC ('K', NULL, FALSE,
"Kind of tag as full name",
"kind of tag as full name",
renderFieldKindName),
DEFINE_FIELD_SPEC ('k', NULL, TRUE,
"Kind of tag as a single letter",
"kind of tag as a single letter",
renderFieldKindLetter),
DEFINE_FIELD_SPEC_FULL ('l', "language", FALSE,
"Language of input file containing tag",
"language of input file containing tag",
renderFieldLanguage, isLanguageFieldAvailable),
DEFINE_FIELD_SPEC_FULL ('m', "implementation", FALSE,
"Implementation information",
"implementation information",
renderFieldImplementation, isImplementationFieldAvailable),
DEFINE_FIELD_SPEC ('n', "line", FALSE,
"Line number of tag definition",
"line number of tag definition",
renderFieldLineNumber),
DEFINE_FIELD_SPEC_FULL ('S', "signature", FALSE,
"Signature of routine (e.g. prototype or parameter list)",
"signature of routine (e.g. prototype or parameter list)",
renderFieldSignature, isSignatureFieldAvailable),
DEFINE_FIELD_SPEC ('s', NULL, TRUE,
"Scope of tag definition (`p' can be used for printing its kind)",
"scope of tag definition (`p' can be used for printing its kind)",
renderFieldScope),
DEFINE_FIELD_SPEC_FULL ('t', "typeref", TRUE,
"Type and name of a variable or typedef",
"type and name of a variable or typedef",
renderFieldTyperef, isTyperefFieldAvailable),
DEFINE_FIELD_SPEC ('z', "kind", FALSE,
"Include the \"kind:\" key in kind field (use k or K) in tags output, kind full name in xref output",
"include the \"kind:\" key in kind field (use k or K) in tags output, kind full name in xref output",
/* Following renderer is for handling --_xformat=%{kind};
and is not for tags output. */
renderFieldKindName),
};

static fieldSpec fieldSpecsUniversal [] = {
DEFINE_FIELD_SPEC_FULL ('r', "role", FALSE,
"Role",
"role",
renderFieldRole, isRoleFieldAvailable),
DEFINE_FIELD_SPEC ('R', NULL, FALSE,
"Marker (R or D) representing whether tag is definition or reference",
"marker (R or D) representing whether tag is definition or reference",
renderFieldRefMarker),
DEFINE_FIELD_SPEC ('Z', "scope", FALSE,
"Include the \"scope:\" key in scope field (use s) in tags output, scope name in xref output",
"include the \"scope:\" key in scope field (use s) in tags output, scope name in xref output",
/* Following renderer is for handling --_xformat=%{scope};
and is not for tags output. */
renderFieldScope),
DEFINE_FIELD_SPEC_FULL ('E', "extra", FALSE,
"Extra tag type information",
"extra tag type information",
renderFieldExtra, isExtraFieldAvailable),
DEFINE_FIELD_SPEC_FULL ('x', "xpath", FALSE,
"xpath for the tag",
"XPath for the tag",
renderFieldXpath, isXpathFieldAvailable),
DEFINE_FIELD_SPEC ('p', "scopeKind", FALSE,
"Kind of scope as full name",
"kind of scope as full name",
renderFieldScopeKindName),
DEFINE_FIELD_SPEC_FULL ('e', "end", FALSE,
"end lines of various items",
Expand Down
Loading