Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (22 sloc) 0.918 kB
// Copyright (c) Andrew Fischer. See LICENSE file for license terms.
// importing.cpp : Functions to help import C functions into Circa.
#pragma once
#include "common_headers.h"
#include "function.h"
namespace circa {
// Create a Circa function, using the given C evaluation function, and
// a header in Circa-syntax.
// Example function header: "function do-something(int, string) -> int"
Term* import_function(Branch* branch, EvaluateFunc func, std::string const& header);
// Install an evaluate function into an existing function object.
void install_function(Term* function, EvaluateFunc evaluate);
Term* install_function(Branch* branch, const char* name, EvaluateFunc evaluate);
Term* import_type(Branch* branch, Type* type);
struct ImportRecord
const char* functionName;
EvaluateFunc evaluate;
void install_function_list(Branch* branch, const ImportRecord* list);
} // namespace circa
Jump to Line
Something went wrong with that request. Please try again.