about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-09-21 16:38:28 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-26 13:21:26 +1000
commitd7928a92e588e11a6c7145cde9ccfd75c4c7cc01 (patch)
treec89337945640fe2c616ec882f6e26a4f031c75f3 /compiler/rustc_codegen_gcc
parent9640d1c02354dc3167f775e56629aaf8974e78f7 (diff)
downloadrust-d7928a92e588e11a6c7145cde9ccfd75c4c7cc01.tar.gz
rust-d7928a92e588e11a6c7145cde9ccfd75c4c7cc01.zip
Clarify spacing computation.
The spacing computation is done in two parts. In the first part
`next_token` and `bump` use `Spacing::Alone` to mean "preceded by
whitespace" and `Spacing::Joint` to mean the opposite. In the second
part `parse_token_tree_other` then adjusts the `spacing` value to mean
the usual thing (i.e. "is the following token joinable punctuation?").
This shift in meaning is very confusing and it took me some time to
understand what was going on.

This commit changes the first part to use a bool, and adds some
comments, which makes things much clearer.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions