You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
774 B
35 lines
774 B
/* |
|
* Copyright (C) 2023 Riyyi |
|
* |
|
* SPDX-License-Identifier: MIT |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <memory> // std::shared_ptr |
|
#include <vector> |
|
|
|
namespace blaze { |
|
|
|
// ----------------------------------------- |
|
// Types |
|
|
|
class Value; |
|
typedef std::shared_ptr<Value> ValuePtr; |
|
typedef std::vector<ValuePtr> ValueVector; |
|
typedef ValueVector::iterator ValueVectorIt; |
|
typedef ValueVector::const_iterator ValueVectorConstIt; |
|
|
|
class Environment; |
|
typedef std::shared_ptr<Environment> EnvironmentPtr; |
|
|
|
// ----------------------------------------- |
|
// Functions |
|
|
|
extern ValuePtr readline(const std::string& prompt); |
|
extern ValuePtr read(std::string_view input); |
|
extern ValuePtr eval(ValuePtr ast, EnvironmentPtr env); |
|
|
|
extern void installFunctions(EnvironmentPtr env); |
|
|
|
} // namespace blaze
|
|
|