From 90b3c18faea19d1a534d6215db686ca4e2028081 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Sun, 17 Apr 2022 19:59:33 +0200 Subject: [PATCH] fix being able to match `~=` as LogicalOperation --- src/front/wgsl/lexer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/front/wgsl/lexer.rs b/src/front/wgsl/lexer.rs index 095648e6a3..2ecafb96aa 100644 --- a/src/front/wgsl/lexer.rs +++ b/src/front/wgsl/lexer.rs @@ -366,7 +366,8 @@ fn consume_token(mut input: &str, generic: bool) -> (Token<'_>, &str) { (Token::Operation(cur), input) } } - '!' | '~' => { + '~' => (Token::Operation(cur), chars.as_str()), + '!' => { input = chars.as_str(); if chars.next() == Some('=') { (Token::LogicalOperation(cur), chars.as_str())