rust/src/libsyntax/parse
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
..
lexer Clarify StringReader::bump. 2016-10-05 08:57:37 +11:00
attr.rs Rename Parser::last_span as prev_span. 2016-10-05 08:53:18 +11:00
classify.rs Fix fallout 2016-06-17 05:21:23 +00:00
common.rs Use associated functions for libsyntax SepSeq constructors. 2016-02-22 23:24:42 -05:00
mod.rs add unstable_features to ParseSess 2016-09-26 07:07:41 +02:00
obsolete.rs Remove parsing of obsolete pre-1.0 syntaxes 2016-09-13 23:33:50 +03:00
parser.rs Rename Parser::last_token_kind as prev_token_kind. 2016-10-05 08:53:18 +11:00
token.rs Auto merge of #37132 - petrochenkov:intern, r=alexcrichton 2016-10-15 09:32:06 -07:00