Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/tokens.rs')
| -rw-r--r-- | crates/parser/src/tokens.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/parser/src/tokens.rs b/crates/parser/src/tokens.rs index de831f0f70..1128cfe99d 100644 --- a/crates/parser/src/tokens.rs +++ b/crates/parser/src/tokens.rs @@ -51,11 +51,8 @@ impl Tokens { /// tokens.push(curr_joint) /// ``` #[inline] - pub fn was_joint(&mut self, yes: bool) { - let idx = self.len(); - if yes && idx > 0 { - self.set_joint(idx - 1); - } + pub fn was_joint(&mut self) { + self.set_joint(self.len() - 1); } #[inline] pub fn push_ident(&mut self, contextual_kw: SyntaxKind) { |