summaryrefslogtreecommitdiff
path: root/rust/src/lambda.rs
blob: 9633bddb38c4bcf91960cee919c5f0fa1b1f691c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::fs::read_to_string;

mod ast;
use ast::*;

mod parser;
use parser::*;

pub fn run(arg: &str) -> String {
    let content = read_to_string(arg).unwrap();
    let value = parse(&content.to_string());
    let result = interpret(value);

    result.to_string()
}

fn interpret(arg: Value) -> Value {
    // interpreting a value is the value itself
    arg
}