Branch: refs/heads/master Author: SiegeLord slabode@aim.com Committer: SiegeLord slabode@aim.com Date: Wed, 02 Apr 2014 01:37:03 UTC Commit: 52a179dce1717a673e8b4e57d507adea2fca6b59 https://github.com/geany/geany/commit/52a179dce1717a673e8b4e57d507adea2fca6b...
Log Message: ----------- Rust: Fix parsing of function pointer struct fields.
Previously, skipUntil was confused by the -> token.
Modified Paths: -------------- tagmanager/ctags/rust.c
Modified: tagmanager/ctags/rust.c 9 files changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -67,6 +67,7 @@ TOKEN_IDENT, TOKEN_LSHIFT, TOKEN_RSHIFT, + TOKEN_RARROW, TOKEN_EOF } tokenType;
@@ -129,6 +130,9 @@ static void writeCurTokenToStr (lexerState *lexer, vString *out_str) case TOKEN_RSHIFT: vStringCatS(out_str, ">>"); break; + case TOKEN_RARROW: + vStringCatS(out_str, "->"); + break; default: vStringPut(out_str, (char) lexer->cur_token); } @@ -356,6 +360,11 @@ static int advanceToken (lexerState *lexer, boolean skip_whitspace) advanceNChar(lexer, 2); return lexer->cur_token = TOKEN_LSHIFT; } + else if (lexer->cur_c == '-' && lexer->next_c == '>') + { + advanceNChar(lexer, 2); + return lexer->cur_token = TOKEN_RARROW; + } else { int c = lexer->cur_c;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).