[geany/geany] 478534: Rust: Allow [] delimeters for macros.

SiegeLord git-noreply at xxxxx
Wed Apr 2 01:37:03 UTC 2014


Branch:      refs/heads/master
Author:      SiegeLord <slabode at aim.com>
Committer:   SiegeLord <slabode at aim.com>
Date:        Wed, 02 Apr 2014 01:37:03 UTC
Commit:      478534e63523b5d7b3998b7b56c82b62600a45ea
             https://github.com/geany/geany/commit/478534e63523b5d7b3998b7b56c82b62600a45ea

Log Message:
-----------
Rust: Allow [] delimeters for macros.

New Rust syntax.


Modified Paths:
--------------
    tagmanager/ctags/rust.c

Modified: tagmanager/ctags/rust.c
27 files changed, 15 insertions(+), 12 deletions(-)
===================================================================
@@ -775,19 +775,22 @@ static void skipMacro (lexerState *lexer)
 	int minus_token = 0;
 
 	advanceToken(lexer, TRUE);
-	if (lexer->cur_token == '(')
-	{
-		plus_token = '(';
-		minus_token = ')';
-	}
-	else if (lexer->cur_token == '{')
-	{
-		plus_token = '{';
-		minus_token = '}';
-	}
-	else
+	switch (lexer->cur_token)
 	{
-		return;
+		case '(':
+			plus_token = '(';
+			minus_token = ')';
+			break;
+		case '{':
+			plus_token = '{';
+			minus_token = '}';
+			break;
+		case '[':
+			plus_token = '[';
+			minus_token = ']';
+			break;
+		default:
+			return;
 	}
 
 	while (lexer->cur_token != TOKEN_EOF)



--------------
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