diff options
| author | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-10-25 01:56:34 -0400 |
|---|---|---|
| committer | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-11-04 23:53:11 -0500 |
| commit | c669ccf3d30da3eb505832d0872bf03607eb98eb (patch) | |
| tree | 274c13139ca8e1dfdf7934317c2c7b8be1267931 /src/libsyntax/parse/lexer.rs | |
| parent | 658637baf45b41e4cff049440bc07f267d810218 (diff) | |
| download | rust-c669ccf3d30da3eb505832d0872bf03607eb98eb.tar.gz rust-c669ccf3d30da3eb505832d0872bf03607eb98eb.zip | |
libsyntax/librustc: Allow calling variadic foreign functions.
Diffstat (limited to 'src/libsyntax/parse/lexer.rs')
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index 7ac999c46a4..49445312a12 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -664,12 +664,18 @@ fn next_token_inner(rdr: @mut StringReader) -> token::Token { ';' => { bump(rdr); return token::SEMI; } ',' => { bump(rdr); return token::COMMA; } '.' => { - bump(rdr); - if rdr.curr == '.' && nextch(rdr) != '.' { - bump(rdr); - return token::DOTDOT; - } - return token::DOT; + bump(rdr); + return if rdr.curr == '.' { + bump(rdr); + if rdr.curr == '.' { + bump(rdr); + token::DOTDOTDOT + } else { + token::DOTDOT + } + } else { + token::DOT + }; } '(' => { bump(rdr); return token::LPAREN; } ')' => { bump(rdr); return token::RPAREN; } |
