oort-vm 1.0.0

The Oort Virtual Machine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::ir::lexer::Token;

pub(crate) fn error(msg: &str) -> ! {
    panic!("{msg}");
}

pub(crate) fn get_token(res: Result<Token, ()>) -> Token {
    match res {
        Ok(t) => t,
        Err(_) => error("Error: Couldn't tokenize code properly!"),
    }
}