diff options
| author | Seiichi Uchida <seuchida@gmail.com> | 2018-03-18 14:29:36 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2018-03-19 08:27:53 +0900 |
| commit | adc257f4b3b2a9a971dfd19721d9ad97fae5d37a (patch) | |
| tree | aacc7bf7b1c0200ad28289b5422977d328bbe021 /src | |
| parent | f8109f8e9c9a460dcb3176bd002985d8a27afc32 (diff) | |
Put a space before colon that appears after a meta variable
Closes #2534.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macros.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs index e36b4c51993..784e6c5798b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -522,6 +522,7 @@ impl MacroArgKind { _ => false, } } + fn starts_with_dollar(&self) -> bool { match *self { MacroArgKind::Repeat(..) | MacroArgKind::MetaVariable(..) => true, @@ -777,6 +778,9 @@ impl MacroArgParser { if ident_like(&self.start_tok) { return true; } + if self.start_tok == Token::Colon { + return true; + } } if force_space_before(&self.start_tok) { |
