diff --git a/crates/squawk_lexer/src/lib.rs b/crates/squawk_lexer/src/lib.rs index 24a3ff75..3f6521ed 100644 --- a/crates/squawk_lexer/src/lib.rs +++ b/crates/squawk_lexer/src/lib.rs @@ -387,7 +387,6 @@ impl Cursor<'_> { while let Some(c) = self.bump() { match c { '$' => { - self.bump(); break; } _ => { @@ -755,4 +754,13 @@ U&"d!0061t!+000061" UESCAPE '!' "foo "" bar" "#)) } + + #[test] + fn dollar_quoted_string() { + assert_debug_snapshot!(lex("$$$$"), @r#" + [ + "$$$$" @ Literal { kind: DollarQuotedString { terminated: true } }, + ] + "#); + } }