diff options
| author | lu4nx | 2016-01-30 14:56:43 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-30 14:56:43 +0200 |
| commit | 40a85fba441aa69d47ef9efd645df3411e43ae21 (patch) | |
| tree | 036fafebce750bb4083bbef7edf3ac0910c903c3 | |
| parent | 25b79d7bc71079cd6ebb2700623e7e3b76b03287 (diff) | |
| download | emacs-40a85fba441aa69d47ef9efd645df3411e43ae21.tar.gz emacs-40a85fba441aa69d47ef9efd645df3411e43ae21.zip | |
Support Go language in 'etags'
* lib-src/etags.c <Ruby_help>: Fix documentation of Ruby tags.
<Go_help>: New help.
<Go_suffixes>: New variable.
(Go_functions): New function.
<lang_names>: Add entry for Go. (Bug#22370)
* doc/emacs/maintaining.texi (Tag Syntax): Document Go support.
* doc/man/etags.1: Mention Go support.
* etc/NEWS: Mention Go support.
* test/etags/go-src/test.go:
* test/etags/go-src/test1.go: New test files.
* test/etags/Makefile (GOSRC): New variable.
(SRCS): Add $(GOSRC).
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6:
* test/etags/CTAGS.good: Adapt to addition of Go tests.
| -rw-r--r-- | doc/emacs/maintaining.texi | 3 | ||||
| -rw-r--r-- | doc/man/etags.1 | 2 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lib-src/etags.c | 75 | ||||
| -rw-r--r-- | test/etags/CTAGS.good | 11 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_1 | 12 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_2 | 12 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_3 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_4 | 12 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_5 | 15 | ||||
| -rw-r--r-- | test/etags/ETAGS.good_6 | 15 | ||||
| -rw-r--r-- | test/etags/Makefile | 7 | ||||
| -rw-r--r-- | test/etags/go-src/test.go | 11 | ||||
| -rw-r--r-- | test/etags/go-src/test1.go | 34 |
14 files changed, 223 insertions, 5 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 7039de63e53..3f1a9c07e91 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -2218,6 +2218,9 @@ in the file. | |||
| 2218 | In Fortran code, functions, subroutines and block data are tags. | 2218 | In Fortran code, functions, subroutines and block data are tags. |
| 2219 | 2219 | ||
| 2220 | @item | 2220 | @item |
| 2221 | In Go code, packages, functions, and types are tags. | ||
| 2222 | |||
| 2223 | @item | ||
| 2221 | In HTML input files, the tags are the @code{title} and the @code{h1}, | 2224 | In HTML input files, the tags are the @code{title} and the @code{h1}, |
| 2222 | @code{h2}, @code{h3} headers. Also, tags are @code{name=} in anchors | 2225 | @code{h2}, @code{h3} headers. Also, tags are @code{name=} in anchors |
| 2223 | and all occurrences of @code{id=}. | 2226 | and all occurrences of @code{id=}. |
diff --git a/doc/man/etags.1 b/doc/man/etags.1 index d34063f23cd..fc247f758a3 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 | |||
| @@ -50,7 +50,7 @@ format understood by | |||
| 50 | .BR vi ( 1 )\c | 50 | .BR vi ( 1 )\c |
| 51 | \&. Both forms of the program understand | 51 | \&. Both forms of the program understand |
| 52 | the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, | 52 | the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, |
| 53 | Forth, HTML, LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Pascal, Perl, | 53 | Forth, Go, HTML, LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Pascal, Perl, |
| 54 | Ruby, PHP, PostScript, Python, Prolog, Scheme and | 54 | Ruby, PHP, PostScript, Python, Prolog, Scheme and |
| 55 | most assembler\-like syntaxes. | 55 | most assembler\-like syntaxes. |
| 56 | Both forms read the files specified on the command line, and write a tag | 56 | Both forms read the files specified on the command line, and write a tag |
| @@ -1834,6 +1834,10 @@ Names of modules, classes, methods, functions, and constants are | |||
| 1834 | tagged. Overloaded operators are also tagged. | 1834 | tagged. Overloaded operators are also tagged. |
| 1835 | 1835 | ||
| 1836 | +++ | 1836 | +++ |
| 1837 | *** New language Go | ||
| 1838 | Names of packages, functions, and types are tagged. | ||
| 1839 | |||
| 1840 | +++ | ||
| 1837 | *** Improved support for Lua | 1841 | *** Improved support for Lua |
| 1838 | 1842 | ||
| 1839 | Etags now tags functions even if the "function" keyword follows some | 1843 | Etags now tags functions even if the "function" keyword follows some |
diff --git a/lib-src/etags.c b/lib-src/etags.c index adc08a23678..bdfced5bc9c 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -354,6 +354,7 @@ static void Cstar_entries (FILE *); | |||
| 354 | static void Erlang_functions (FILE *); | 354 | static void Erlang_functions (FILE *); |
| 355 | static void Forth_words (FILE *); | 355 | static void Forth_words (FILE *); |
| 356 | static void Fortran_functions (FILE *); | 356 | static void Fortran_functions (FILE *); |
| 357 | static void Go_functions (FILE *); | ||
| 357 | static void HTML_labels (FILE *); | 358 | static void HTML_labels (FILE *); |
| 358 | static void Lisp_functions (FILE *); | 359 | static void Lisp_functions (FILE *); |
| 359 | static void Lua_functions (FILE *); | 360 | static void Lua_functions (FILE *); |
| @@ -641,6 +642,10 @@ static const char *Fortran_suffixes [] = | |||
| 641 | static const char Fortran_help [] = | 642 | static const char Fortran_help [] = |
| 642 | "In Fortran code, functions, subroutines and block data are tags."; | 643 | "In Fortran code, functions, subroutines and block data are tags."; |
| 643 | 644 | ||
| 645 | static const char *Go_suffixes [] = {"go", NULL}; | ||
| 646 | static const char Go_help [] = | ||
| 647 | "In Go code, functions, interfaces and packages are tags."; | ||
| 648 | |||
| 644 | static const char *HTML_suffixes [] = | 649 | static const char *HTML_suffixes [] = |
| 645 | { "htm", "html", "shtml", NULL }; | 650 | { "htm", "html", "shtml", NULL }; |
| 646 | static const char HTML_help [] = | 651 | static const char HTML_help [] = |
| @@ -727,7 +732,7 @@ static const char *Ruby_suffixes [] = | |||
| 727 | { "rb", "ruby", NULL }; | 732 | { "rb", "ruby", NULL }; |
| 728 | static const char Ruby_help [] = | 733 | static const char Ruby_help [] = |
| 729 | "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\ | 734 | "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\ |
| 730 | a line generate a tag."; | 735 | a line generate a tag. Constants also generate a tag."; |
| 731 | 736 | ||
| 732 | /* Can't do the `SCM' or `scm' prefix with a version number. */ | 737 | /* Can't do the `SCM' or `scm' prefix with a version number. */ |
| 733 | static const char *Scheme_suffixes [] = | 738 | static const char *Scheme_suffixes [] = |
| @@ -794,6 +799,7 @@ static language lang_names [] = | |||
| 794 | { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes }, | 799 | { "erlang", Erlang_help, Erlang_functions, Erlang_suffixes }, |
| 795 | { "forth", Forth_help, Forth_words, Forth_suffixes }, | 800 | { "forth", Forth_help, Forth_words, Forth_suffixes }, |
| 796 | { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes }, | 801 | { "fortran", Fortran_help, Fortran_functions, Fortran_suffixes }, |
| 802 | { "go", Go_help, Go_functions, Go_suffixes }, | ||
| 797 | { "html", HTML_help, HTML_labels, HTML_suffixes }, | 803 | { "html", HTML_help, HTML_labels, HTML_suffixes }, |
| 798 | { "java", Cjava_help, Cjava_entries, Cjava_suffixes }, | 804 | { "java", Cjava_help, Cjava_entries, Cjava_suffixes }, |
| 799 | { "lisp", Lisp_help, Lisp_functions, Lisp_suffixes }, | 805 | { "lisp", Lisp_help, Lisp_functions, Lisp_suffixes }, |
| @@ -4209,6 +4215,73 @@ Fortran_functions (FILE *inf) | |||
| 4209 | 4215 | ||
| 4210 | 4216 | ||
| 4211 | /* | 4217 | /* |
| 4218 | * Go language support | ||
| 4219 | * Original code by Xi Lu <lx@shellcodes.org> (2016) | ||
| 4220 | */ | ||
| 4221 | static void | ||
| 4222 | Go_functions(FILE *inf) | ||
| 4223 | { | ||
| 4224 | char *cp, *name; | ||
| 4225 | |||
| 4226 | LOOP_ON_INPUT_LINES(inf, lb, cp) | ||
| 4227 | { | ||
| 4228 | cp = skip_spaces (cp); | ||
| 4229 | |||
| 4230 | if (LOOKING_AT (cp, "package")) | ||
| 4231 | { | ||
| 4232 | name = cp; | ||
| 4233 | while (!notinname (*cp) && *cp != '\0') | ||
| 4234 | cp++; | ||
| 4235 | make_tag (name, cp - name, false, lb.buffer, | ||
| 4236 | cp - lb.buffer + 1, lineno, linecharno); | ||
| 4237 | } | ||
| 4238 | else if (LOOKING_AT (cp, "func")) | ||
| 4239 | { | ||
| 4240 | /* Go implementation of interface, such as: | ||
| 4241 | func (n *Integer) Add(m Integer) ... | ||
| 4242 | skip `(n *Integer)` part. | ||
| 4243 | */ | ||
| 4244 | if (*cp == '(') | ||
| 4245 | { | ||
| 4246 | while (*cp != ')') | ||
| 4247 | cp++; | ||
| 4248 | cp = skip_spaces (cp+1); | ||
| 4249 | } | ||
| 4250 | |||
| 4251 | if (*cp) | ||
| 4252 | { | ||
| 4253 | name = cp; | ||
| 4254 | |||
| 4255 | while (!notinname (*cp)) | ||
| 4256 | cp++; | ||
| 4257 | |||
| 4258 | make_tag (name, cp - name, true, lb.buffer, | ||
| 4259 | cp - lb.buffer + 1, lineno, linecharno); | ||
| 4260 | } | ||
| 4261 | } | ||
| 4262 | else if (members && LOOKING_AT (cp, "type")) | ||
| 4263 | { | ||
| 4264 | name = cp; | ||
| 4265 | |||
| 4266 | /* Ignore the likes of the following: | ||
| 4267 | type ( | ||
| 4268 | A | ||
| 4269 | ) | ||
| 4270 | */ | ||
| 4271 | if (*cp == '(') | ||
| 4272 | return; | ||
| 4273 | |||
| 4274 | while (!notinname (*cp) && *cp != '\0') | ||
| 4275 | cp++; | ||
| 4276 | |||
| 4277 | make_tag (name, cp - name, false, lb.buffer, | ||
| 4278 | cp - lb.buffer + 1, lineno, linecharno); | ||
| 4279 | } | ||
| 4280 | } | ||
| 4281 | } | ||
| 4282 | |||
| 4283 | |||
| 4284 | /* | ||
| 4212 | * Ada parsing | 4285 | * Ada parsing |
| 4213 | * Original code by | 4286 | * Original code by |
| 4214 | * Philippe Waroquiers (1998) | 4287 | * Philippe Waroquiers (1998) |
diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index 86eb9f85cf3..846725ef713 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good | |||
| @@ -947,6 +947,10 @@ MoveLayerAfter lua-src/allegro.lua /^function MoveLayerAfter (this_one)$/ | |||
| 947 | MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ | 947 | MoveLayerBefore lua-src/allegro.lua /^function MoveLayerBefore (this_one)$/ |
| 948 | MoveLayerBottom lua-src/allegro.lua /^function MoveLayerBottom ()$/ | 948 | MoveLayerBottom lua-src/allegro.lua /^function MoveLayerBottom ()$/ |
| 949 | MoveLayerTop lua-src/allegro.lua /^function MoveLayerTop ()$/ | 949 | MoveLayerTop lua-src/allegro.lua /^function MoveLayerTop ()$/ |
| 950 | Mtest.go go-src/test.go 1 | ||
| 951 | Mtest.go go-src/test.go /^func main() {$/ | ||
| 952 | Mtest1.go go-src/test1.go 1 | ||
| 953 | Mtest1.go go-src/test1.go /^func main() {$/ | ||
| 950 | Mx.cc cp-src/x.cc /^main(int argc, char *argv[])$/ | 954 | Mx.cc cp-src/x.cc /^main(int argc, char *argv[])$/ |
| 951 | NAME y-src/cccp.c 8 | 955 | NAME y-src/cccp.c 8 |
| 952 | NATNUMP c-src/emacs/src/lisp.h /^NATNUMP (Lisp_Object x)$/ | 956 | NATNUMP c-src/emacs/src/lisp.h /^NATNUMP (Lisp_Object x)$/ |
| @@ -1077,6 +1081,8 @@ Pkg1_Proc2/p ada-src/waroquiers.ada /^ procedure Pkg1_Proc2 (I : Integer);$/ | |||
| 1077 | Pkg1_Proc2/p ada-src/waroquiers.ada /^ procedure Pkg1_Proc2 (I : Integer) is$/ | 1081 | Pkg1_Proc2/p ada-src/waroquiers.ada /^ procedure Pkg1_Proc2 (I : Integer) is$/ |
| 1078 | PostControls pyt-src/server.py /^ def PostControls(self):$/ | 1082 | PostControls pyt-src/server.py /^ def PostControls(self):$/ |
| 1079 | Pre_Call_State/t ada-src/2ataspri.ads /^ type Pre_Call_State is new System.Address;$/ | 1083 | Pre_Call_State/t ada-src/2ataspri.ads /^ type Pre_Call_State is new System.Address;$/ |
| 1084 | PrintAdd go-src/test1.go /^func (s str) PrintAdd() {$/ | ||
| 1085 | PrintAdd go-src/test1.go /^func (n intNumber) PrintAdd() {$/ | ||
| 1080 | Private objc-src/Subprocess.m /^@interface Subprocess(Private)$/ | 1086 | Private objc-src/Subprocess.m /^@interface Subprocess(Private)$/ |
| 1081 | Private_T/b ada-src/etags-test-for.ada /^ task body Private_T is$/ | 1087 | Private_T/b ada-src/etags-test-for.ada /^ task body Private_T is$/ |
| 1082 | Private_T/b ada-src/waroquiers.ada /^ task body Private_T is$/ | 1088 | Private_T/b ada-src/waroquiers.ada /^ task body Private_T is$/ |
| @@ -3135,6 +3141,7 @@ instance_method_question? ruby-src/test.rb /^ def instance_method_questio | |||
| 3135 | instr y-src/parse.y 80 | 3141 | instr y-src/parse.y 80 |
| 3136 | instr parse.y 80 | 3142 | instr parse.y 80 |
| 3137 | instruct c-src/etags.c 2527 | 3143 | instruct c-src/etags.c 2527 |
| 3144 | intNumber go-src/test1.go 13 | ||
| 3138 | integer c-src/emacs/src/lisp.h 2127 | 3145 | integer c-src/emacs/src/lisp.h 2127 |
| 3139 | integer cccp.y 113 | 3146 | integer cccp.y 113 |
| 3140 | integer y-src/cccp.y 112 | 3147 | integer y-src/cccp.y 112 |
| @@ -3738,6 +3745,7 @@ plain_C_suffixes c-src/etags.c 643 | |||
| 3738 | plainc c-src/etags.c 2934 | 3745 | plainc c-src/etags.c 2934 |
| 3739 | plist c-src/emacs/src/lisp.h 697 | 3746 | plist c-src/emacs/src/lisp.h 697 |
| 3740 | plus cp-src/functions.cpp /^void Date::plus ( int days , int month , int year / | 3747 | plus cp-src/functions.cpp /^void Date::plus ( int days , int month , int year / |
| 3748 | plus go-src/test1.go 5 | ||
| 3741 | plusvalseq prol-src/natded.prolog /^plusvalseq([]) --> [].$/ | 3749 | plusvalseq prol-src/natded.prolog /^plusvalseq([]) --> [].$/ |
| 3742 | pointer c-src/emacs/src/lisp.h 2125 | 3750 | pointer c-src/emacs/src/lisp.h 2125 |
| 3743 | poll_for_input c-src/emacs/src/keyboard.c /^poll_for_input (struct atimer *timer)$/ | 3751 | poll_for_input c-src/emacs/src/keyboard.c /^poll_for_input (struct atimer *timer)$/ |
| @@ -3950,6 +3958,7 @@ save_getcjmp c-src/emacs/src/keyboard.c /^save_getcjmp (sys_jmp_buf temp)$/ | |||
| 3950 | save_type c-src/emacs/src/lisp.h /^save_type (struct Lisp_Save_Value *v, int n)$/ | 3958 | save_type c-src/emacs/src/lisp.h /^save_type (struct Lisp_Save_Value *v, int n)$/ |
| 3951 | savenstr c-src/etags.c /^savenstr (const char *cp, int len)$/ | 3959 | savenstr c-src/etags.c /^savenstr (const char *cp, int len)$/ |
| 3952 | savestr c-src/etags.c /^savestr (const char *cp)$/ | 3960 | savestr c-src/etags.c /^savestr (const char *cp)$/ |
| 3961 | say go-src/test.go /^func say(msg string) {$/ | ||
| 3953 | scan_separators c-src/etags.c /^scan_separators (char *name)$/ | 3962 | scan_separators c-src/etags.c /^scan_separators (char *name)$/ |
| 3954 | scolonseen c-src/etags.c 2447 | 3963 | scolonseen c-src/etags.c 2447 |
| 3955 | scratch c-src/sysdep.h 56 | 3964 | scratch c-src/sysdep.h 56 |
| @@ -4075,6 +4084,7 @@ step cp-src/clheir.hpp /^ virtual void step(void) { }$/ | |||
| 4075 | step_everybody cp-src/clheir.cpp /^void step_everybody(void)$/ | 4084 | step_everybody cp-src/clheir.cpp /^void step_everybody(void)$/ |
| 4076 | stop_polling c-src/emacs/src/keyboard.c /^stop_polling (void)$/ | 4085 | stop_polling c-src/emacs/src/keyboard.c /^stop_polling (void)$/ |
| 4077 | store_user_signal_events c-src/emacs/src/keyboard.c /^store_user_signal_events (void)$/ | 4086 | store_user_signal_events c-src/emacs/src/keyboard.c /^store_user_signal_events (void)$/ |
| 4087 | str go-src/test1.go 9 | ||
| 4078 | strcaseeq c-src/etags.c /^#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=/ | 4088 | strcaseeq c-src/etags.c /^#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=/ |
| 4079 | streq c-src/etags.c /^#define streq(s,t) (assert ((s)!=NULL || (t)!=NULL/ | 4089 | streq c-src/etags.c /^#define streq(s,t) (assert ((s)!=NULL || (t)!=NULL/ |
| 4080 | string_intervals c-src/emacs/src/lisp.h /^string_intervals (Lisp_Object s)$/ | 4090 | string_intervals c-src/emacs/src/lisp.h /^string_intervals (Lisp_Object s)$/ |
| @@ -4217,6 +4227,7 @@ terminateInput objc-src/Subprocess.m /^- terminateInput$/ | |||
| 4217 | test c-src/emacs/src/lisp.h 1871 | 4227 | test c-src/emacs/src/lisp.h 1871 |
| 4218 | test cp-src/c.C 86 | 4228 | test cp-src/c.C 86 |
| 4219 | test erl-src/gs_dialog.erl /^test() ->$/ | 4229 | test erl-src/gs_dialog.erl /^test() ->$/ |
| 4230 | test go-src/test1.go /^func test(p plus) {$/ | ||
| 4220 | test php-src/ptest.php /^test $/ | 4231 | test php-src/ptest.php /^test $/ |
| 4221 | test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ | 4232 | test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ |
| 4222 | test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ | 4233 | test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ |
diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 44ac091066b..c7b122111c4 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 | |||
| @@ -2283,6 +2283,18 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 2283 | code assemby-code-word 43,685 | 2283 | code assemby-code-word 43,685 |
| 2284 | : a-forth-word 50,870 | 2284 | : a-forth-word 50,870 |
| 2285 | 2285 | ||
| 2286 | go-src/test.go,48 | ||
| 2287 | package main1,0 | ||
| 2288 | func say(5,28 | ||
| 2289 | func main(9,72 | ||
| 2290 | |||
| 2291 | go-src/test1.go,119 | ||
| 2292 | package main1,0 | ||
| 2293 | func (s str) PrintAdd(17,136 | ||
| 2294 | func (n intNumber) PrintAdd(21,189 | ||
| 2295 | func test(25,248 | ||
| 2296 | func main(29,285 | ||
| 2297 | |||
| 2286 | html-src/softwarelibero.html,200 | 2298 | html-src/softwarelibero.html,200 |
| 2287 | Cos'è il software libero?4,38 | 2299 | Cos'è il software libero?4,38 |
| 2288 | Licenze d'uso di un programmalicenze65,2500 | 2300 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index 8a93e3b0656..8d0f33824a4 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 | |||
| @@ -2852,6 +2852,18 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 2852 | code assemby-code-word 43,685 | 2852 | code assemby-code-word 43,685 |
| 2853 | : a-forth-word 50,870 | 2853 | : a-forth-word 50,870 |
| 2854 | 2854 | ||
| 2855 | go-src/test.go,48 | ||
| 2856 | package main1,0 | ||
| 2857 | func say(5,28 | ||
| 2858 | func main(9,72 | ||
| 2859 | |||
| 2860 | go-src/test1.go,119 | ||
| 2861 | package main1,0 | ||
| 2862 | func (s str) PrintAdd(17,136 | ||
| 2863 | func (n intNumber) PrintAdd(21,189 | ||
| 2864 | func test(25,248 | ||
| 2865 | func main(29,285 | ||
| 2866 | |||
| 2855 | html-src/softwarelibero.html,200 | 2867 | html-src/softwarelibero.html,200 |
| 2856 | Cos'è il software libero?4,38 | 2868 | Cos'è il software libero?4,38 |
| 2857 | Licenze d'uso di un programmalicenze65,2500 | 2869 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index e575b40ab0d..060389c6232 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 | |||
| @@ -2600,6 +2600,21 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 2600 | code assemby-code-word 43,685 | 2600 | code assemby-code-word 43,685 |
| 2601 | : a-forth-word 50,870 | 2601 | : a-forth-word 50,870 |
| 2602 | 2602 | ||
| 2603 | go-src/test.go,48 | ||
| 2604 | package main1,0 | ||
| 2605 | func say(5,28 | ||
| 2606 | func main(9,72 | ||
| 2607 | |||
| 2608 | go-src/test1.go,172 | ||
| 2609 | package main1,0 | ||
| 2610 | type plus 5,28 | ||
| 2611 | type str 9,65 | ||
| 2612 | type intNumber 13,99 | ||
| 2613 | func (s str) PrintAdd(17,136 | ||
| 2614 | func (n intNumber) PrintAdd(21,189 | ||
| 2615 | func test(25,248 | ||
| 2616 | func main(29,285 | ||
| 2617 | |||
| 2603 | html-src/softwarelibero.html,200 | 2618 | html-src/softwarelibero.html,200 |
| 2604 | Cos'è il software libero?4,38 | 2619 | Cos'è il software libero?4,38 |
| 2605 | Licenze d'uso di un programmalicenze65,2500 | 2620 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 28258060517..40404f9fc6e 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 | |||
| @@ -2447,6 +2447,18 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 2447 | code assemby-code-word 43,685 | 2447 | code assemby-code-word 43,685 |
| 2448 | : a-forth-word 50,870 | 2448 | : a-forth-word 50,870 |
| 2449 | 2449 | ||
| 2450 | go-src/test.go,48 | ||
| 2451 | package main1,0 | ||
| 2452 | func say(5,28 | ||
| 2453 | func main(9,72 | ||
| 2454 | |||
| 2455 | go-src/test1.go,119 | ||
| 2456 | package main1,0 | ||
| 2457 | func (s str) PrintAdd(17,136 | ||
| 2458 | func (n intNumber) PrintAdd(21,189 | ||
| 2459 | func test(25,248 | ||
| 2460 | func main(29,285 | ||
| 2461 | |||
| 2450 | html-src/softwarelibero.html,200 | 2462 | html-src/softwarelibero.html,200 |
| 2451 | Cos'è il software libero?4,38 | 2463 | Cos'è il software libero?4,38 |
| 2452 | Licenze d'uso di un programmalicenze65,2500 | 2464 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 35bb353c767..432819d3b32 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 | |||
| @@ -3333,6 +3333,21 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 3333 | code assemby-code-word 43,685 | 3333 | code assemby-code-word 43,685 |
| 3334 | : a-forth-word 50,870 | 3334 | : a-forth-word 50,870 |
| 3335 | 3335 | ||
| 3336 | go-src/test.go,48 | ||
| 3337 | package main1,0 | ||
| 3338 | func say(5,28 | ||
| 3339 | func main(9,72 | ||
| 3340 | |||
| 3341 | go-src/test1.go,172 | ||
| 3342 | package main1,0 | ||
| 3343 | type plus 5,28 | ||
| 3344 | type str 9,65 | ||
| 3345 | type intNumber 13,99 | ||
| 3346 | func (s str) PrintAdd(17,136 | ||
| 3347 | func (n intNumber) PrintAdd(21,189 | ||
| 3348 | func test(25,248 | ||
| 3349 | func main(29,285 | ||
| 3350 | |||
| 3336 | html-src/softwarelibero.html,200 | 3351 | html-src/softwarelibero.html,200 |
| 3337 | Cos'è il software libero?4,38 | 3352 | Cos'è il software libero?4,38 |
| 3338 | Licenze d'uso di un programmalicenze65,2500 | 3353 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index 8add300784f..4ad5d76db27 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 | |||
| @@ -3333,6 +3333,21 @@ constant (a-forth-constant(a-forth-constant38,628 | |||
| 3333 | code assemby-code-word 43,685 | 3333 | code assemby-code-word 43,685 |
| 3334 | : a-forth-word 50,870 | 3334 | : a-forth-word 50,870 |
| 3335 | 3335 | ||
| 3336 | go-src/test.go,48 | ||
| 3337 | package main1,0 | ||
| 3338 | func say(5,28 | ||
| 3339 | func main(9,72 | ||
| 3340 | |||
| 3341 | go-src/test1.go,172 | ||
| 3342 | package main1,0 | ||
| 3343 | type plus 5,28 | ||
| 3344 | type str 9,65 | ||
| 3345 | type intNumber 13,99 | ||
| 3346 | func (s str) PrintAdd(17,136 | ||
| 3347 | func (n intNumber) PrintAdd(21,189 | ||
| 3348 | func test(25,248 | ||
| 3349 | func main(29,285 | ||
| 3350 | |||
| 3336 | html-src/softwarelibero.html,200 | 3351 | html-src/softwarelibero.html,200 |
| 3337 | Cos'è il software libero?4,38 | 3352 | Cos'è il software libero?4,38 |
| 3338 | Licenze d'uso di un programmalicenze65,2500 | 3353 | Licenze d'uso di un programmalicenze65,2500 |
diff --git a/test/etags/Makefile b/test/etags/Makefile index 00d5b9f52b2..21a77eb0c5d 100644 --- a/test/etags/Makefile +++ b/test/etags/Makefile | |||
| @@ -11,6 +11,7 @@ ELSRC=$(addprefix ./el-src/,TAGTEST.EL emacs/lisp/progmodes/etags.el) | |||
| 11 | ERLSRC=$(addprefix ./erl-src/,gs_dialog.erl) | 11 | ERLSRC=$(addprefix ./erl-src/,gs_dialog.erl) |
| 12 | FORTHSRC=$(addprefix ./forth-src/,test-forth.fth) | 12 | FORTHSRC=$(addprefix ./forth-src/,test-forth.fth) |
| 13 | FSRC=$(addprefix ./f-src/,entry.for entry.strange_suffix entry.strange) | 13 | FSRC=$(addprefix ./f-src/,entry.for entry.strange_suffix entry.strange) |
| 14 | GOSRC=$(addprefix ./go-src/,test.go test1.go) | ||
| 14 | HTMLSRC=$(addprefix ./html-src/,softwarelibero.html index.shtml algrthms.html software.html) | 15 | HTMLSRC=$(addprefix ./html-src/,softwarelibero.html index.shtml algrthms.html software.html) |
| 15 | #JAVASRC=$(addprefix ./java-src/, ) | 16 | #JAVASRC=$(addprefix ./java-src/, ) |
| 16 | LUASRC=$(addprefix ./lua-src/,allegro.lua test.lua) | 17 | LUASRC=$(addprefix ./lua-src/,allegro.lua test.lua) |
| @@ -27,9 +28,9 @@ RBSRC=$(addprefix ./ruby-src/,test.rb test1.ruby) | |||
| 27 | TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) | 28 | TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) |
| 28 | YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) | 29 | YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) |
| 29 | SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ | 30 | SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ |
| 30 | ${FORTHSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC} ${OBJCSRC}\ | 31 | ${FORTHSRC} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\ |
| 31 | ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC} ${PROLSRC} ${PYTSRC}\ | 32 | ${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\ |
| 32 | ${RBSRC} ${TEXSRC} ${YSRC} | 33 | ${PROLSRC} ${PYTSRC} ${RBSRC} ${TEXSRC} ${YSRC} |
| 33 | NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz | 34 | NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz |
| 34 | 35 | ||
| 35 | ETAGS_PROG=../../lib-src/etags | 36 | ETAGS_PROG=../../lib-src/etags |
diff --git a/test/etags/go-src/test.go b/test/etags/go-src/test.go new file mode 100644 index 00000000000..6aea26ef210 --- /dev/null +++ b/test/etags/go-src/test.go | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | import "fmt" | ||
| 4 | |||
| 5 | func say(msg string) { | ||
| 6 | fmt.Println(msg) | ||
| 7 | } | ||
| 8 | |||
| 9 | func main() { | ||
| 10 | say("Hello, Emacs!") | ||
| 11 | } | ||
diff --git a/test/etags/go-src/test1.go b/test/etags/go-src/test1.go new file mode 100644 index 00000000000..6d1efaaa8a9 --- /dev/null +++ b/test/etags/go-src/test1.go | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | import "fmt" | ||
| 4 | |||
| 5 | type plus interface { | ||
| 6 | PrintAdd() | ||
| 7 | } | ||
| 8 | |||
| 9 | type str struct { | ||
| 10 | a, b string | ||
| 11 | } | ||
| 12 | |||
| 13 | type intNumber struct { | ||
| 14 | a, b int | ||
| 15 | } | ||
| 16 | |||
| 17 | func (s str) PrintAdd() { | ||
| 18 | fmt.Println(s.a + s.b) | ||
| 19 | } | ||
| 20 | |||
| 21 | func (n intNumber) PrintAdd() { | ||
| 22 | fmt.Println(n.a + n.b) | ||
| 23 | } | ||
| 24 | |||
| 25 | func test(p plus) { | ||
| 26 | p.PrintAdd() | ||
| 27 | } | ||
| 28 | |||
| 29 | func main() { | ||
| 30 | s := str{a: "Hello,", b: "Emacs!"} | ||
| 31 | number := intNumber{a: 1, b: 2} | ||
| 32 | test(number) | ||
| 33 | test(s) | ||
| 34 | } | ||