]> git.lizzy.rs Git - rust.git/commit
Rename some stuff in `StringReader`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 9 May 2018 02:49:39 +0000 (12:49 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Sun, 13 May 2018 07:16:03 +0000 (17:16 +1000)
commit7a090fbe02b6b20f0dce8acf07a0328375f91d68
treeb75e60117cb9b618b1cf3eb2f26a23802f87b63b
parentb1aae607c56d26333589dc45daa20859950bf6e1
Rename some stuff in `StringReader`.

- `source_text` becomes `src`, matching `FileMap::src`.

- `byte_offset()` becomes `src_index()`, which makes it clearer that
  it's an index into `src`. (Likewise for variables containing
  `byte_offset` in their name.) This function also now returns a `usize`
  instead of a `BytePos`, because every callsite immediately converted
  the `BytePos` to a `usize`.
src/libsyntax/parse/lexer/mod.rs