mirror of
https://github.com/lisk77/lambda.git
synced 2025-10-24 18:28:49 +00:00
feat: initial commit
This commit is contained in:
commit
0dd91da74f
17 changed files with 683 additions and 0 deletions
14
include/evaluator.hpp
Normal file
14
include/evaluator.hpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef EVALUATOR_HPP
|
||||
#define EVALUATOR_HPP
|
||||
|
||||
#include "ast.hpp"
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
std::unique_ptr<Expr> normalize(const std::unique_ptr<Expr>&, const std::unordered_map<std::string, std::unique_ptr<Expr>>&);
|
||||
std::unique_ptr<Expr> substitute(const std::string&, const std::unique_ptr<Expr>&, const std::unique_ptr<Expr>&);
|
||||
std::unique_ptr<Expr> evaluate(const std::unique_ptr<Expr>&, const std::unordered_map<std::string, std::unique_ptr<Expr>>&);
|
||||
std::unique_ptr<Expr> evaluateMain(const std::unordered_map<std::string, std::unique_ptr<Expr>>&);
|
||||
|
||||
#endif // EVALUATOR_HPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue