diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-12-16 16:24:06 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-12-16 16:24:06 +0100 |
| commit | 2336aeb4c32864f53a4d4e0f72e54a174df47a60 (patch) | |
| tree | e45a039b82b62231a5bde9d58c28cb3df713a77e /src/parse/tokens.rs | |
| parent | 6bbedeaa2c6e0068e2fb6602cbf0002fb6a6ce03 (diff) | |
Tweak parser error messages 🔮
Diffstat (limited to 'src/parse/tokens.rs')
| -rw-r--r-- | src/parse/tokens.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs index 91477eb9..3dcc6460 100644 --- a/src/parse/tokens.rs +++ b/src/parse/tokens.rs @@ -75,7 +75,7 @@ impl<'s> Iterator for Tokens<'s> { // Comments. '/' if self.s.eat_if('/') => self.line_comment(), '/' if self.s.eat_if('*') => self.block_comment(), - '*' if self.s.eat_if('/') => Token::Invalid("*/"), + '*' if self.s.eat_if('/') => Token::StarSlash, // Functions and blocks. '[' => Token::LeftBracket, @@ -779,8 +779,8 @@ mod tests { #[test] fn test_tokenize_invalid() { // Test invalidly closed block comments. - t!(Both: "*/" => Invalid("*/")); - t!(Both: "/**/*/" => BC(""), Invalid("*/")); + t!(Both: "*/" => StarSlash); + t!(Both: "/**/*/" => BC(""), StarSlash); // Test invalid expressions. t!(Header: r"\" => Invalid(r"\")); |
