34 #include "lib/charbuf.h" 36 #include "system/program.h" 169 static char* ret = (
char*)
"ERRND";
190 while (*source !=
'\0' && *source >= 32 && *source <= 126)
192 *destination++ = *source++;
246 if (
first ==
nullptr)
257 while (current !=
nullptr)
271 static char* ret = (
char*)
"SBLCK";
ErrorNode(const char *input, const char *message, const char *parameter, int pos)
void Append(const char c)
void Add(SyntaxNode *node)
StatementBlockElement * first
virtual ReductionType GetReductionType()
void Attach(SyntaxNode *node)
Used to create a linked list of statements.
void Replace(SyntaxNode *n, SyntaxNode *x)
A sequence of statements in a syntax tree.
Base class for all nodes in a syntax tree.
void Attach(SyntaxNode *node)
virtual char * GetNodeText()=0
void ClearBuffer()
Release memory in buffer.
void Append(const char *source)
CharBuffer()
Initialize without allocating memory.
bool GetFirstNode() const
ExpressionNode(Number *value)
virtual ~ExpressionNode()
virtual char * Execute()=0
void SetParent(SyntaxNode *node)
virtual void ResetIterator()
void Detach(SyntaxNode *node)
ErrorNode(const char *input, int pos)
SyntaxNode * GetParent() const
void EnsureGrowth(unsigned int size)
Represents an error message encapsulated in a syntax tree.
int StrLen(const char *string)
Get the length of a null terminated string.
static void StrCopyVisible(char *destination, const char *source)
void Replace(SyntaxNode *n, SyntaxNode *x)
Base class for all nodes related to mathematical expressions.
unsigned int AllocAndCopy(char **destination, const char *source)
Allocate memory and copy a string into the array.
void Append(const char c, unsigned int count)
void Detach(SyntaxNode *node)
Encapsulate an character array which can be used as a string.
void EnsureSize(unsigned int size)
Ensure a memory block of specified size is allocated.
StatementBlockElement * next
void ClearAndAlloc(unsigned int size)
Release memory and allocate new size.