rust/src/librustc_save_analysis
bors 3543a0f602 Auto merge of #36969 - nnethercote:rename-Parser-fields, r=eddyb
Clarify the positions of the lexer and parser

The lexer and parser use unclear names to indicate their positions in the
source code. I propose the following renamings.

Lexer:
```
pos      -> next_pos      # it's actually the next pos!
last_pos -> pos           # it's actually the current pos!
curr     -> ch            # the current char
curr_is  -> ch_is         # tests the current char
col (unchanged)           # the current column
```
parser
```
- last_span       -> prev_span          # the previous token's span
- last_token_kind -> prev_token_kind    # the previous token's kind
- LastTokenKind   -> PrevTokenKind      # ditto (but the type)
- token (unchanged)                     # the current token
- span (unchanged)                      # the current span
```

Things to note:
- This proposal removes all uses of "last", which is an unclear word because it
  could mean (a) previous, (b) final, or (c) most recent, i.e. current.
- The "current" things (ch, col, token, span) consistently lack a prefix. The
  "previous" and "next" things consistently have a prefix.
2016-10-17 22:27:57 -07:00
..
Cargo.toml Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
csv_dumper.rs Fixed missing comma in the csv dumper. 2016-07-25 11:46:59 +02:00
data.rs rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
dump.rs save-analysis: attempt number 2 at a JSON version 2016-05-11 13:50:23 -07:00
dump_visitor.rs Turn some impossible definitions into ICEs 2016-10-04 22:25:25 +03:00
external_data.rs rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
json_api_dumper.rs rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
json_dumper.rs rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
lib.rs Turn some impossible definitions into ICEs 2016-10-04 22:25:25 +03:00
span_utils.rs Rename Parser::last_span as prev_span. 2016-10-05 08:53:18 +11:00