<commit_before>mod ast;
mod parser;

fn main() {
    println!("Hello, world!");
}<commit_msg>Make `main()` actually parse and print an AST<commit_after>use std::process::exit;
use std::{env, fs};

mod ast;
mod parser;

fn main() {
    let args: Vec<String> = env::args().collect();
    if args.len() < 2 || args.len() > 2 {
        println!("Usage: hummingbird [file]");
        exit(-1);
    }
    let filename = &args[1];
    let source = fs::read_to_string(filename).expect("Unable to read source file");

    let program = parser::parse(source);
    println!("Program:\n{:?}", program);
}
{'fraction_non_alphanumeric': 0.19087837837837837, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 3.782258064516129, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4278924', 'n_tokens_mistral': 201, 'n_tokens_neox': 195, 'n_words': 54}