Kiwi Script
KiwiScript Interpreter
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
Data Structures | Functions
KSConstantExpression.h File Reference

IR for KSConstantExpression class. More...

#include "KSExpression.h"

Go to the source code of this file.

Data Structures

struct  KSConstantExpression
 

Functions

struct KSConstantExpression * KEAllocateBooleanExpression (CNBoolean val, struct KELineInfo *linfo, struct CNResource *resource)
 Allocate boolean constant expression. More...
 
struct KSConstantExpression * KEAllocateSignedIntegerExpression (int64_t val, struct KELineInfo *linfo, struct CNResource *resource)
 Allocate signed integer constant expression. More...
 
struct KSConstantExpression * KEAllocateUnsignedIntegerExpression (uint64_t val, struct KELineInfo *linfo, struct CNResource *resource)
 Allocate unsigned integer constant expression. More...
 
struct KSConstantExpression * KEAllocateFloatExpression (double val, struct KELineInfo *linfo, struct CNResource *resource)
 Allocate floating point value expression. More...
 
struct KSConstantExpression * KEAllocateStringExpression (struct CNString *val, struct KELineInfo *linfo, struct CNResource *resource)
 Allocate boolean string expression. More...
 
CNBoolean KSIsConstantExpression (const struct KSExpression *src)
 Check the expression class. More...
 

Detailed Description

IR for KSConstantExpression class.

Copyright
Copyright (C) 2014 Steel Wheels Project

Function Documentation

struct KSConstantExpression* KEAllocateBooleanExpression ( CNBoolean  val,
struct KELineInfo *  linfo,
struct CNResource *  resource 
)

Allocate boolean constant expression.

Returns
Allocated expression
Parameters
valSource value
linfoLine information of the expression
resourceResource to allocate the expression
struct KSConstantExpression* KEAllocateFloatExpression ( double  val,
struct KELineInfo *  linfo,
struct CNResource *  resource 
)

Allocate floating point value expression.

Returns
Allocated expression
Parameters
valSource value
linfoLine information of the expression
resourceResource to allocate the expression
struct KSConstantExpression* KEAllocateSignedIntegerExpression ( int64_t  val,
struct KELineInfo *  linfo,
struct CNResource *  resource 
)

Allocate signed integer constant expression.

Returns
Allocated expression
Parameters
valSource value
linfoLine information of the expression
resourceResource to allocate the expression
struct KSConstantExpression* KEAllocateStringExpression ( struct CNString *  val,
struct KELineInfo *  linfo,
struct CNResource *  resource 
)

Allocate boolean string expression.

Returns
Allocated expression
Parameters
valSource value
linfoLine information of the expression
resourceResource to allocate the expression
struct KSConstantExpression* KEAllocateUnsignedIntegerExpression ( uint64_t  val,
struct KELineInfo *  linfo,
struct CNResource *  resource 
)

Allocate unsigned integer constant expression.

Returns
Allocated expression
Parameters
valSource value
linfoLine information of the expression
resourceResource to allocate the expression
CNBoolean KSIsConstantExpression ( const struct KSExpression *  src)

Check the expression class.

Return values
TrueThe source expression is an object of the class
FalseThe source expression is NOT an object of the class
Parameters
srcSource expression