8#ifndef HPP_ALIB_EXPRESSIONS_EXPRESSION
9#define HPP_ALIB_EXPRESSIONS_EXPRESSION
13#if ALIB_TIME && ALIB_DEBUG
20namespace alib {
namespace expressions {
25namespace detail{
class Program;
struct VirtualMachine; }
84 #if ALIB_TIME && ALIB_DEBUG
120 const String& sourceString,
256 template<
typename... TArgs>
271 Expression(
size_t initialBufferSizeInKB,
unsigned int bufferGrowthInPercent )
272 :
TSharedMonoVal(initialBufferSizeInKB, bufferGrowthInPercent ) {}
295namespace APPENDABLES {
326 target << src->GetNormalizedString();
ALIB_API ExpressionVal(MonoAllocator &allocator, const String &sourceString, Scope *pCTScope)
String GetOriginalString() const
detail::Program * GetProgram()
String originalString
The original source string of the expression.
Ticks::Duration DbgAssemblyTime
detail::Program * program
The compiled expression program.
ALIB_API Box Evaluate(Scope &scope)
Ticks::Duration DbgLastEvaluationTime
String name
The name of the expression (if named, otherwise resourced, usually "ANONYMOUS" ).
String GetNormalizedString() const
AString optimizedString
The normalized string generated on request out of optimized expression program.
Ticks::Duration DbgParseTime
MonoAllocator & allocator
ALIB_API Box ResultType()
AString normalizedString
The normalized string as a result of compilation.
ALIB_API String GetOptimizedString()
ALIB_API ~ExpressionVal()
Destructor.
void Reset(TArgs &&... args)
lox::Scope Scope
Type alias in namespace alib.
characters::character character
Type alias in namespace alib.
expressions::Compiler Compiler
Type alias in namespace alib.
Expression()=default
Constructs an empty instance, hence a cleared automatic pointer.
Expression(std::nullptr_t) noexcept
Expression(size_t initialBufferSizeInKB, unsigned int bufferGrowthInPercent)
void Reset(TArgs &&... args)
void operator()(AString &target, const expressions::ExpressionVal &src)
void operator()(AString &target, const expressions::Expression &src)