elmx 0.1.0

elm compiler and runtime
Documentation
pub mod token;
pub mod lexer;

use std::iter::Peekable;

use token::{Token, TokenKind};
use lexer::Lexer;

pub struct Parser<'a> {
    peekable: Peekable<Lexer<'a>>,
    current: Option<Token<'a>>,
}

impl<'a> Parser<'a> {
    pub fn new(input: &'a str) -> Self {
        Self {
            peekable: Lexer::new(input).peekable(),
            current: None,
        }
    }

    pub fn parse(self) -> Ast {
        todo!()
    }
}

pub struct Ast {
    exprs: Vec<Expr>,
}

impl Ast {
    pub fn new() -> Self {
        Self {
            exprs: Vec::new(),
        }
    }
}

enum Expr {
}