template-project-cpp
Loading...
Searching...
No Matches
tpcpp Namespace Reference

All tpcpp classes are placed in this namespace. More...

Classes

struct  Assign
 
struct  Binary
 
class  Box
 Boxing for all tpcpp::Expr classes. More...
 
struct  Call
 
struct  Callable
 An interface for callable objects. More...
 
struct  EvaluatorExpr
 Evaluate each tpcpp::Expr to a tpcpp::Object. More...
 
struct  Function
 
struct  FunctionTraits
 
struct  FunctionTraits< std::function< R(Args...)> >
 
struct  Grouping
 
class  Interpreter
 The tpcpp interpreter, which is a simple calculator. More...
 
struct  Literal
 
struct  Logical
 
struct  OpCollector
 Helper class to collect call operators from all lambdas. More...
 
class  Parser
 The tpcpp parser. More...
 
struct  PrinterExpr
 Print each tpcpp::Expr as a string. More...
 
struct  RuntimeError
 
class  Scanner
 The tpcpp scanner/lexer. More...
 
struct  Token
 a single unit of source code, as produced by the Scanner. More...
 
struct  Unary
 
struct  Variable
 

Concepts

concept  AllOfTheSameType
 
concept  ObjectToType
 
concept  IsTokenType
 

Typedefs

using CallablePtr = std::shared_ptr<Callable>
 A std::shared_ptr type for tpcpp::Callable.
 
using Object = std::variant<bool, long, double, CallablePtr>
 A std::variant type used in expression evaluation.
 
using Expr
 A variant type that can hold any of the expression types.
 

Detailed Description

All tpcpp classes are placed in this namespace.

Typedef Documentation

◆ Object

using tpcpp::Object = std::variant<bool, long, double, CallablePtr>

A std::variant type used in expression evaluation.

It may contain one of the following types:

Note
It is the only type used in expression evaluation.

Definition at line 32 of file Object.hpp.