aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 65e6ee9b26dfa0a37626f9e5349c7a1138ca8ad8 (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
#![warn(
    clippy::wildcard_imports,
    clippy::string_add,
    clippy::string_add_assign,
    clippy::manual_ok_or,
    unused_lifetimes
)]

pub mod lexer;

use lexer::Lexer;

const SOURCE: &str = r#"

if 5 >= 7 {
    print "Hello World";
}

"#;

fn main() {
    let lexer = Lexer::new(SOURCE);
    for token in lexer {
        print!("{} ", token.lexeme);
    }
}