botanist  v0.1.0
Loading...
Searching...
No Matches
double.hpp
Go to the documentation of this file.
1
4
5#ifndef BOTANIST_EVALUATOR_DOUBLE_H
6#define BOTANIST_EVALUATOR_DOUBLE_H
7
8#include <stdlib.h>
9#include <string.h>
10
11#include <collection2/list.hpp>
12#include <collection2/stack.hpp>
13
15
16namespace botanist {
17
19class DoubleEvaluator final {
20 private:
22 collection2::Stack<double>& calcStack;
23
31 bool getValueFromNode(const SyntaxNode& node, double& value) const;
32
33 public:
34 explicit DoubleEvaluator(collection2::Stack<double>& calcStack) : calcStack(calcStack){};
35
43 double evaluate(collection2::List<SyntaxNode>& nodeList);
44};
45
46} // namespace botanist
47
48#endif
構文評価器 (倍精度浮動小数点数)
Definition: double.hpp:19
double evaluate(collection2::List< SyntaxNode > &nodeList)
引数に与えられた直列化済みの構文木を解析し、結果を返します。
構文木のノード
Definition: syntaxnode.hpp:15