diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-05-13 14:30:18 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-05-13 14:54:34 +0300 |
| commit | e249f2e526cca687b78a766769c481cfb638f02e (patch) | |
| tree | a69e96f271835ab6bf5ef72588c85b7f275f96d9 /src/libsyntax/parse | |
| parent | b91e0a378690871fa744768f38d42bd90830bcd0 (diff) | |
| download | rust-e249f2e526cca687b78a766769c481cfb638f02e.tar.gz rust-e249f2e526cca687b78a766769c481cfb638f02e.zip | |
move raw span to tt reader
See https://github.com/rust-lang/rust/pull/50838/files#r283296243 for explanation how jointness checking works with *next* pair
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/tokentrees.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/tokentrees.rs b/src/libsyntax/parse/lexer/tokentrees.rs index 1070d6dcb1b..4bfc5bb16c0 100644 --- a/src/libsyntax/parse/lexer/tokentrees.rs +++ b/src/libsyntax/parse/lexer/tokentrees.rs @@ -207,6 +207,8 @@ impl<'a> TokenTreesReader<'a> { // Note that testing for joint-ness here is done via the raw // source span as the joint-ness is a property of the raw source // rather than wanting to take `override_span` into account. + // Additionally, we actually check if the *next* pair of tokens + // is joint, but this is equivalent to checking the current pair. let raw = self.string_reader.peek_span_src_raw; self.real_token(); let is_joint = raw.hi() == self.string_reader.peek_span_src_raw.lo() @@ -222,4 +224,3 @@ impl<'a> TokenTreesReader<'a> { self.span = t.sp; } } - |
