Impulse Graph C++ Engine 2.4.0
High-Performance Zero-Copy C-ABI Kernel and C++20 Fluent VM Engine
Loading...
Searching...
No Matches
impulse::compiler::ScmLiteral Class Reference

#include <impulse_scm_ast.hpp>

Inheritance diagram for impulse::compiler::ScmLiteral:
Collaboration diagram for impulse::compiler::ScmLiteral:

Public Types

enum class  LitType { INT , FLOAT , BOOL , STRING }

Public Member Functions

NodeKind kind () const override
std::string to_scm_string () const override
Public Member Functions inherited from impulse::compiler::ImpScmNode
virtual ~ImpScmNode ()=default

Static Public Member Functions

static std::shared_ptr< ScmLiteral > of_int (int64_t v)
static std::shared_ptr< ScmLiteral > of_float (double v)
static std::shared_ptr< ScmLiteral > of_bool (bool v)
static std::shared_ptr< ScmLiteral > of_str (std::string v)

Public Attributes

LitType type
int64_t int_val {0}
double float_val {0.0}
bool bool_val {false}
std::string str_val

Member Enumeration Documentation

◆ LitType

Enumerator
INT 
FLOAT 
BOOL 
STRING 

Member Function Documentation

◆ kind()

NodeKind impulse::compiler::ScmLiteral::kind ( ) const
inlinenodiscardoverridevirtual

◆ of_bool()

std::shared_ptr< ScmLiteral > impulse::compiler::ScmLiteral::of_bool ( bool v)
inlinestatic

◆ of_float()

std::shared_ptr< ScmLiteral > impulse::compiler::ScmLiteral::of_float ( double v)
inlinestatic

◆ of_int()

std::shared_ptr< ScmLiteral > impulse::compiler::ScmLiteral::of_int ( int64_t v)
inlinestatic

◆ of_str()

std::shared_ptr< ScmLiteral > impulse::compiler::ScmLiteral::of_str ( std::string v)
inlinestatic

◆ to_scm_string()

std::string impulse::compiler::ScmLiteral::to_scm_string ( ) const
inlinenodiscardoverridevirtual

Member Data Documentation

◆ bool_val

bool impulse::compiler::ScmLiteral::bool_val {false}

◆ float_val

double impulse::compiler::ScmLiteral::float_val {0.0}

◆ int_val

int64_t impulse::compiler::ScmLiteral::int_val {0}

◆ str_val

std::string impulse::compiler::ScmLiteral::str_val

◆ type

LitType impulse::compiler::ScmLiteral::type

The documentation for this class was generated from the following file: