blob: 8f3c001f4038089a0abb5cb43390815144c7d258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#![feature(test, let_chains)]
#![warn(
clippy::wildcard_imports,
clippy::string_add,
clippy::string_add_assign,
clippy::manual_ok_or,
unused_lifetimes
)]
pub mod ast;
pub mod lexer;
use lexer::Lexer;
const SOURCE: &str = r#"
val variable = 5;
if variable >= 7 {
print "Hello World";
}
"#;
fn main() {
let lexer = Lexer::new(SOURCE);
for token in lexer {
print!("{} ", token.lexeme);
}
}
|