about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-30 16:26:18 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-30 16:26:18 -0800
commitfa130ae6ffa8d0923567d1359ec0a76a87bc9978 (patch)
treec8b9dfa3d10038c9e33b2f24db8036498a84c0b9 /src/rustllvm/RustWrapper.cpp
parentecf48fb4694c84c3f07f9eb97d519de0d08a79ba (diff)
parent1e278c1cd1307d06d57c556676e3035516334d2d (diff)
downloadrust-fa130ae6ffa8d0923567d1359ec0a76a87bc9978.tar.gz
rust-fa130ae6ffa8d0923567d1359ec0a76a87bc9978.zip
rollup merge of #20330: fhahn/issue-15877-model-lexer-range-2
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.

cc @cmr
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions