mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
fix: empty variables are allowed
This commit is contained in:
parent
8f10f2f240
commit
40fce89238
1 changed files with 0 additions and 6 deletions
|
|
@ -574,14 +574,8 @@ impl<'a> Lexer<'a> {
|
|||
|
||||
match tok {
|
||||
b'?' => {
|
||||
let start_digit = self.offset;
|
||||
self.eat_while(|b| b.is_some() && b.unwrap().is_ascii_digit());
|
||||
|
||||
// empty variable name
|
||||
if start_digit == self.offset {
|
||||
return Err(Error::BadVariableName((start, self.offset - start).into()));
|
||||
}
|
||||
|
||||
Ok(Token {
|
||||
value: &self.input[start + 1..self.offset], // do not include '? in the value
|
||||
token_type: Some(TokenType::TK_VARIABLE),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue