mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
test exprs
This commit is contained in:
1
parser/README.md
Normal file
1
parser/README.md
Normal file
@@ -0,0 +1 @@
|
||||
TODO
|
||||
@@ -231,7 +231,7 @@ impl<'a> Lexer<'a> {
|
||||
|
||||
Token {
|
||||
value: &self.input[start..self.offset],
|
||||
token_type: Some(TokenType::TK_RP),
|
||||
token_type: Some(TokenType::TK_PTR),
|
||||
}
|
||||
}
|
||||
_ => Token {
|
||||
@@ -258,12 +258,16 @@ impl<'a> Lexer<'a> {
|
||||
break; // End of block comment
|
||||
}
|
||||
None => {
|
||||
return Err(Error::UnterminatedBlockComment((self.offset, 1).into()))
|
||||
return Err(Error::UnterminatedBlockComment(
|
||||
(self.offset, 1).into(),
|
||||
))
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
None => return Err(Error::UnterminatedBlockComment((self.offset, 1).into())),
|
||||
None => {
|
||||
return Err(Error::UnterminatedBlockComment((self.offset, 1).into()))
|
||||
}
|
||||
_ => unreachable!(), // We should not reach here
|
||||
}
|
||||
}
|
||||
@@ -665,14 +669,14 @@ mod tests {
|
||||
b"->".as_slice(),
|
||||
Token {
|
||||
value: b"->".as_slice(),
|
||||
token_type: Some(TokenType::TK_RP),
|
||||
token_type: Some(TokenType::TK_PTR),
|
||||
},
|
||||
),
|
||||
(
|
||||
b"->>".as_slice(),
|
||||
Token {
|
||||
value: b"->>".as_slice(),
|
||||
token_type: Some(TokenType::TK_RP),
|
||||
token_type: Some(TokenType::TK_PTR),
|
||||
},
|
||||
),
|
||||
(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pub mod error;
|
||||
pub mod token;
|
||||
pub mod ast;
|
||||
pub mod error;
|
||||
pub mod lexer;
|
||||
pub mod parser;
|
||||
pub mod token;
|
||||
|
||||
1048
parser/src/parser.rs
1048
parser/src/parser.rs
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user