[geany/geany] 91ee43: Parse 'where' bounds correctly.
Pavel Sountsov
git-noreply at xxxxx
Sat Aug 22 04:19:47 UTC 2015
Branch: refs/heads/master
Author: Pavel Sountsov <siege at google.com>
Committer: SiegeLord <slabode at aim.com>
Date: Sat, 22 Aug 2015 04:19:47 UTC
Commit: 91ee4376406007b3fceb516059517820527e4c70
https://github.com/geany/geany/commit/91ee4376406007b3fceb516059517820527e4c70
Log Message:
-----------
Parse 'where' bounds correctly.
Modified Paths:
--------------
tagmanager/ctags/rust.c
tests/ctags/test_input.rs
tests/ctags/test_input.rs.tags
Modified: tagmanager/ctags/rust.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -650,7 +650,8 @@ static void parseQualifiedType (lexerState *lexer, vString* name)
{
if (lexer->cur_token == TOKEN_IDENT)
{
- if (strcmp(lexer->token_str->buffer, "for") == 0)
+ if (strcmp(lexer->token_str->buffer, "for") == 0
+ || strcmp(lexer->token_str->buffer, "where") == 0)
break;
vStringClear(name);
vStringCat(name, lexer->token_str);
Modified: tests/ctags/test_input.rs
13 lines changed, 13 insertions(+), 0 deletions(-)
===================================================================
@@ -28,6 +28,19 @@ pub struct B
bar: isize
}
+pub struct C<T> where T: Send
+{
+ a: T
+}
+
+pub trait D<T> where T: Send
+{
+}
+
+impl<T> D<T> for C<T> where T: Send
+{
+}
+
/*
* fn ignored_in_comment() {}
*/
Modified: tests/ctags/test_input.rs.tags
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -4,6 +4,9 @@ Animal
B�2048�0
Bar�2048�0
Baz�2048�0
+C�1�0
+C�2048�0
+D�32�0
DoZ�32�0
Foo�1�0
Foo�2048�0
@@ -14,6 +17,7 @@ SuperTraitTest
Testable�32�0
TraitedStructTest�1�0
TraitedStructTest�2048�0
+a�8�C�0
a_anteater�4�Animal�0
a_bear�4�Animal�0
a_cat�4�Animal�0
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list