diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 11:13:15 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:32 +0100 |
commit | b8ce0e28a0114e8a253ab205189f7cb159218a46 (patch) | |
tree | 378e8b44d6e3f59aff4d4912a71b166a1c8aa525 /gcc | |
parent | 67d50818a7f0f06385d4635bdd96614cb542c5ee (diff) | |
download | gcc-b8ce0e28a0114e8a253ab205189f7cb159218a46.zip gcc-b8ce0e28a0114e8a253ab205189f7cb159218a46.tar.gz gcc-b8ce0e28a0114e8a253ab205189f7cb159218a46.tar.bz2 |
gccrs: dump: Fix spacing with dots and references
A space was output around dots as well as after references, this made
things kinda horrible to look at and clearly not usual.
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::require_spacing): Add a rule to
remove spaces around dots and after references.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index ba8b0ba..a1e153a 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -46,6 +46,7 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current) case DOLLAR_SIGN: case SEMICOLON: case COMMA: + case DOT: return false; default: break; @@ -56,6 +57,8 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current) case SCOPE_RESOLUTION: case LEFT_SQUARE: case LEFT_PAREN: + case AMP: + case DOT: return false; default: return true; |