Skip to content
Merged
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
2 changes: 2 additions & 0 deletions Tmain/extras-field-for-pseudo-tags.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_ROLE_DESCRIPTION!C!function foreigncall /called in foreign languages/
!_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/
!_TAG_ROLE_DESCRIPTION!C!header local /local header/
!_TAG_ROLE_DESCRIPTION!C!header system /system header/
Expand Down Expand Up @@ -54,6 +55,7 @@ main input.c /^int main (void) { return 0; }$/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //;" extras:pseudo
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/;" extras:pseudo
!_TAG_PROGRAM_URL https://ctags.io/ /official site/;" extras:pseudo
!_TAG_ROLE_DESCRIPTION!C!function foreigncall /called in foreign languages/;" extras:pseudo
!_TAG_ROLE_DESCRIPTION!C!function foreigndecl /declared in foreign languages/;" extras:pseudo
!_TAG_ROLE_DESCRIPTION!C!header local /local header/;" extras:pseudo
!_TAG_ROLE_DESCRIPTION!C!header system /system header/;" extras:pseudo
Expand Down
3 changes: 2 additions & 1 deletion Tmain/json-output-format.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@
{"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "m,member", "pattern": "class members"}
{"_type": "ptag", "name": "TAG_KIND_DESCRIPTION", "parserName": "Python", "path": "v,variable", "pattern": "variables"}
{"_type": "ptag", "name": "TAG_OUTPUT_EXCMD", "path": "mixed", "pattern": "number, pattern, mixed, or combineV2"}
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "C", "path": "1.1", "pattern": "current.age"}
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "C", "path": "2.2", "pattern": "current.age"}
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Go", "path": "0.0", "pattern": "current.age"}
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Man", "path": "0.0", "pattern": "current.age"}
{"_type": "ptag", "name": "TAG_PARSER_VERSION", "parserName": "Python", "path": "1.1", "pattern": "current.age"}
{"_type": "ptag", "name": "TAG_PATTERN_LENGTH_LIMIT", "path": "96", "pattern": "0 for no limit"}
{"_type": "ptag", "name": "TAG_PROGRAM_AUTHOR", "path": "Universal Ctags Team", "pattern": ""}
{"_type": "ptag", "name": "TAG_PROGRAM_NAME", "path": "Universal Ctags", "pattern": "Derived from Exuberant Ctags"}
{"_type": "ptag", "name": "TAG_PROGRAM_URL", "path": "https://ctags.io/", "pattern": "official site"}
{"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "function", "path": "foreigncall", "pattern": "called in foreign languages"}
{"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "function", "path": "foreigndecl", "pattern": "declared in foreign languages"}
{"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "header", "path": "local", "pattern": "local header"}
{"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "C", "kindName": "header", "path": "system", "pattern": "system header"}
Expand Down
2 changes: 1 addition & 1 deletion Tmain/list-kinds-full.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ D macroparam no no 0 C 0 parameters inside macro definitions
L label no no 0 C 0 goto labels
d macro yes no 2 C 0 macro definitions
e enumerator yes no 0 C 0 enumerators (values inside an enumeration)
f function yes no 1 C 0 function definitions
f function yes no 2 C 0 function definitions
g enum yes no 0 C 0 enumeration names
h header yes yes 2 C 0 included header files
l local no no 0 C 0 local variables
Expand Down
27 changes: 27 additions & 0 deletions Tmain/list-roles.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Basic f/function decl on 0 declare
Bats S/script loaded on 0 script loaed with "load" command
C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
C d/macro undef on 0 undefined
C f/function foreigncall on 2 called in foreign languages
C f/function foreigndecl on 1 declared in foreign languages
C h/header local on 0 local header
C h/header system on 0 system header
Expand Down Expand Up @@ -176,6 +177,7 @@ Basic f/function decl on 0 declare
Bats S/script loaded on 0 script loaed with "load" command
C d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
C d/macro undef on 0 undefined
C f/function foreigncall on 2 called in foreign languages
C f/function foreigndecl on 1 declared in foreign languages
C h/header local on 0 local header
C h/header system on 0 system header
Expand Down Expand Up @@ -307,6 +309,7 @@ Zsh s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand Down Expand Up @@ -346,6 +349,7 @@ s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -357,6 +361,7 @@ s/struct foreigndecl off 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -369,6 +374,7 @@ s/struct foreigndecl off 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition on 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -381,6 +387,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition on 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -392,6 +399,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -410,6 +418,7 @@ s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -429,6 +438,7 @@ s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition on 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -449,6 +459,7 @@ s/script loaded off 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition on 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -468,6 +479,7 @@ s/script loaded off 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -486,6 +498,7 @@ s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -505,6 +518,7 @@ s/script loaded on 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -525,6 +539,7 @@ s/script loaded off 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -544,6 +559,7 @@ s/script loaded off 0 loaded
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system off 0 system header
Expand All @@ -555,6 +571,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system off 0 system header
Expand All @@ -566,6 +583,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -577,6 +595,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -588,6 +607,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -599,6 +619,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local off 0 local header
h/header system off 0 system header
Expand All @@ -611,6 +632,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -623,6 +645,7 @@ s/struct foreigndecl off 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -634,6 +657,7 @@ s/struct foreigndecl off 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local off 0 local header
h/header system on 0 system header
Expand All @@ -645,6 +669,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef on 0 undefined
f/function foreigncall on 2 called in foreign languages
f/function foreigndecl on 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -656,6 +681,7 @@ s/struct foreigndecl on 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand All @@ -667,6 +693,7 @@ s/struct foreigndecl off 1 declared in foreign languages
#KIND(L/N) NAME ENABLED VER DESCRIPTION
d/macro condition off 0 used in part of #if/#ifdef/#elif conditions
d/macro undef off 0 undefined
f/function foreigncall off 2 called in foreign languages
f/function foreigndecl off 1 declared in foreign languages
h/header local on 0 local header
h/header system on 0 system header
Expand Down
2 changes: 1 addition & 1 deletion Tmain/nested-subparsers.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ D macroparam no no 0 C 0 parameters inside macro def
L label no no 0 C 0 goto labels
d macro yes no 2 C 0 macro definitions
e enumerator yes no 0 C 0 enumerators (values inside an enumeration)
f function yes no 1 C 0 function definitions
f function yes no 2 C 0 function definitions
g enum yes no 0 C 0 enumeration names
h header yes yes 2 C 0 included header files
l local no no 0 C 0 local variables
Expand Down
2 changes: 1 addition & 1 deletion Tmain/version-option.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
parser/C: 1.1
parser/C: 2.2
1 change: 1 addition & 0 deletions Units/parser-sql.r/funcions.d/args.ctags
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--sort=no
--fields=+S
--extras=+g
9 changes: 9 additions & 0 deletions Units/parser-sql.r/funcions.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ isalpha input.sql /^create or replace FUNCTION isalpha(ch CHAR)$/;" f typeref:ty
isalphanum input.sql /^create or replace FUNCTION isalphanum(ch CHAR)$/;" f typeref:typename:BOOLEAN signature:(ch CHAR)
isdigit input.sql /^create or replace function isdigit(ch CHAR)$/;" f typeref:typename:BOOLEAN signature:(ch CHAR)
rpmver_array input.sql /^create or replace FUNCTION rpmver_array (string1 IN VARCHAR)$/;" f typeref:typename:evr_array_item[] signature:(string1 IN VARCHAR)
str1 input.sql /^ str1 VARCHAR := string1;$/;" v
digits input.sql /^ digits VARCHAR(10) := '0123456789';$/;" v
lc_alpha input.sql /^ lc_alpha VARCHAR(27) := 'abcdefghijklmnopqrstuvwxyz';$/;" v
uc_alpha input.sql /^ uc_alpha VARCHAR(27) := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';$/;" v
alpha input.sql /^ alpha VARCHAR(54) := lc_alpha || uc_alpha;$/;" v
one input.sql /^ one VARCHAR;$/;" v
isnum input.sql /^ isnum BOOLEAN;$/;" v
ver_array input.sql /^ ver_array evr_array_item[] := ARRAY[]::evr_array_item[];$/;" v
segment_loop input.sql /^ <<segment_loop>>$/;" L
dfunc0 input-0.sql /^create function dfunc0(a text DEFAULT '->''Hello', b text DEFAULT 'World''') returns text as $\$$/;" f typeref:typename:text signature:(a text DEFAULT '->''Hello', b text DEFAULT 'World''')
dfunc1 input-0.sql /^create function dfunc1(r numeric = 20.39, p numeric DEFAULT 99.88) returns numeric as $\$$/;" f typeref:typename:numeric signature:(r numeric = 20.39, p numeric DEFAULT 99.88)
dfunc2 input-0.sql /^create function dfunc2(anyelement = 'World'::text) returns text as $\$$/;" f typeref:typename:text signature:(anyelement = 'World'::text)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--sort=no
--fields=+lSr
--extras=+r
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
isnlt input.sql /^CREATE FUNCTION isnlt(ean13, ean13)$/;" f language:SQL typeref:typename:boolean signature:(ean13, ean13) roles:def
int8lt input.sql /^ AS 'int8lt'$/;" f language:C roles:foreigncall
isnle input.sql /^CREATE FUNCTION isnle(ean13, ean13)$/;" f language:SQL typeref:typename:boolean signature:(ean13, ean13) roles:def
int8le input.sql /^ AS 'int8le'$/;" f language:C roles:foreigncall
12 changes: 12 additions & 0 deletions Units/parser-sql.r/sql_pgSQL_with_language_internal.d/input.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE FUNCTION isnlt(ean13, ean13)
RETURNS boolean
AS 'int8lt'
LANGUAGE 'internal'
IMMUTABLE STRICT
PARALLEL SAFE;
CREATE FUNCTION isnle(ean13, ean13)
RETURNS boolean
AS 'int8le'
LANGUAGE 'internal'
IMMUTABLE STRICT
PARALLEL SAFE;
Loading
Loading