Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
BindedArg.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <ast/Arg.h>
9#include <alib/string>
10
11namespace cli {
12
13class BindedArg final : public Arg {
14 std::string m_bind;
15
16public:
17 BindedArg ( std::string bind ) : m_bind ( std::move ( bind ) ) {
18 }
19
20 std::string eval ( Environment & environment ) const override {
21 return environment.getBinding ( m_bind );
22 }
23};
24
25} /* namespace cli */
26
Definition: Arg.h:13
Definition: BindedArg.h:13
BindedArg(std::string bind)
Definition: BindedArg.h:17
std::string eval(Environment &environment) const override
Definition: BindedArg.h:20
Definition: Environment.h:29
std::string getBinding(const std::string &name) const
Definition: Environment.cpp:33
Definition: Arg.h:11
Definition: FordFulkerson.hpp:16