rust-lang/rust — pull request #20330 by fhahn (2014-12-30 13:21:18+00:00)
Title: Handle function calls to integers in model lexer correctly

This patch resolves the second problem mentioned in #15877: function calls to integers, e.g. `3.b()`.

It does so, by checking whether the character following the first dot of a FLOAT_LIT is a character or an underscore (these should denote a valid identifier). This does not look like a particularly, but it seems like a lookahead of 1 is needed for this distinction.

Another interesting aspect are ranges that start with a integer constant, but end with a function call, e.g. `1..b()`. Rust treats this as a range from 1 to `b()`, but given that `1.` is a valid FLOAT_LIT, `1..b()` could be a function call to a float as well.