Unified the C# mod and the Rust compiler into a monorepo
This commit is contained in:
21
rust_compiler/libs/parser/src/test/blocks.rs
Normal file
21
rust_compiler/libs/parser/src/test/blocks.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use tokenizer::Tokenizer;
|
||||
|
||||
use crate::Parser;
|
||||
|
||||
#[test]
|
||||
fn test_block() -> anyhow::Result<()> {
|
||||
let mut parser = crate::parser!(
|
||||
r#"
|
||||
{
|
||||
let x = 5;
|
||||
let y = 10;
|
||||
}
|
||||
"#
|
||||
);
|
||||
|
||||
let expression = parser.parse()?.unwrap();
|
||||
|
||||
assert_eq!("{ (let x = 5); (let y = 10); }", expression.to_string());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user