diff options
| author | bors <bors@rust-lang.org> | 2016-10-17 22:27:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 22:27:57 -0700 |
| commit | 3543a0f6020fb16860f471e8651fa05f5709e83a (patch) | |
| tree | a4ed9fd39414df30ca4c891131f55d2c755ef6d8 /src/liballoc_jemalloc | |
| parent | 1d3dfa5301f59e86547a4034fb654c4efb47ac0e (diff) | |
| parent | 94b36594c628d6703f879856b9b3d4d08a6debfa (diff) | |
| download | rust-3543a0f6020fb16860f471e8651fa05f5709e83a.tar.gz rust-3543a0f6020fb16860f471e8651fa05f5709e83a.zip | |
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.
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions
