using Compiler;

const string contents = """
                        func main(): i32 {
                            let x: i32 = 23
                            x = 24
                            
                            if true {
                                x = 49
                            } else {
                                x = 3
                            }
                            
                            while false {
                                x = 6
                            }
                            
                            do_something("test")
                            return x
                        }
                        
                        func do_something(text: string): void {
                        }
                        """;

var tokens = Tokenizer.Tokenize(contents);
var nodes = Parser.Parse(tokens);
var output = Generator.Emit(nodes);

File.WriteAllText("C:/Users/oliste/repos/nub-lang/compiler/Compiler/out.c", output);
