HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
formula_arguments.hpp
1// Copyright Take Vos 2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "formula_node.hpp"
8
9namespace tt {
10
14 formula_vector args;
15
17 formula_node(std::move(location)), args(std::move(args)) {}
18
20 formula_node(std::move(location))
21 {
22 args.push_back(std::move(arg1));
23 args.push_back(std::move(arg2));
24 }
25
26 datum evaluate(formula_evaluation_context& context) const override {
27 return {};
28 };
29
30 std::string string() const noexcept override {
31 std::string s = "<args ";
32 int i = 0;
33 for (ttlet &arg: args) {
34 if (i++ > 0) {
35 s += ", ";
36 }
37 s += arg->string();
38 }
39 return s + ">";
40 }
41};
42
43}
A temporary node used during parsing.
Definition formula_arguments.hpp:13
datum evaluate(formula_evaluation_context &context) const override
Evaluate an rvalue.
Definition formula_arguments.hpp:26
Definition formula_evaluation_context.hpp:16
Definition formula_node.hpp:19
Definition parse_location.hpp:16
T move(T... args)