tcalc 0.2.0
 
Loading...
Searching...
No Matches
base.hpp File Reference

Base visitor class. More...

#include <memory>
#include "tcalc/ast/binaryop.hpp"
#include "tcalc/ast/control_flow.hpp"
#include "tcalc/ast/function.hpp"
#include "tcalc/ast/node.hpp"
#include "tcalc/ast/number.hpp"
#include "tcalc/ast/program.hpp"
#include "tcalc/ast/unaryop.hpp"
#include "tcalc/ast/variable.hpp"
#include "tcalc/error.hpp"

Go to the source code of this file.

Classes

class  tcalc::ast::BaseVisitor< RT >
 Base visitor class with default return type. More...
 

Macros

#define __check_node_type(node, type, entry)
 
#define VISIT_DEFAULT(node)
 

Detailed Description

Base visitor class.

Author
Dessera (desse.nosp@m.ra@q.nosp@m.q.com)
Version
0.2.0
Date
2025-06-16

Macro Definition Documentation

◆ __check_node_type

#define __check_node_type (   node,
  type,
  entry 
)
Value:
if (auto node_type = std::dynamic_pointer_cast<type>(node)) { \
return entry(node_type); \
}

◆ VISIT_DEFAULT

#define VISIT_DEFAULT (   node)
Value:
{ \
(void)node; \
return error::ok<RT>(); \
}