Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions Include/Frontend/Parser/AST/Nodes/BurstASTNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,37 @@
#include <string.h>
#include <stdbool.h>

#include <assert.h>

#include "BurstCommons.h"
#include "BurstErrorCodes.h"
#include "BurstErrorMessages.h"

#define BURST_VARIABLE_DECLARATION_NODE 0x00
#define BURST_VALUE_EXPRESSION_NODE 0x01
#define BURST_LITERAL_EXPRESSION_NODE 0x02
#define BURST_ARITHMETIC_EXPRESSION_NODE 0x03
#define BURST_REFERENCE_EXPRESSION_NODE 0x04
#define BURST_FUNCTION_DECLARATION_NODE 0x05
#define BURST_AST_GENERIC_NODE 0x00
#define BURST_AST_LITERAL_EXPRESSION_NODE 0x01

// The 'BurstASTNode' struct is a generic AST node, designed to store
// information about other AST nodes.
//
// The information contained within this struct, will be the type of AST node
// being contained, as well as a pointer to said AST node.
//
// We take this approach, as it allows us to have one central node that we can
// use to reference other AST nodes with. The usefulness of this will
// [hopefully] become more apparent in the future.
struct burstASTNode;
typedef struct burstASTNode
{
int nodeType;
void *pNode;
} BurstASTNode;

// These are placed below the definition of the 'BurstASTNode' type, because
// there's a chance that one of the following files might require the use of
// that type.
#include "BurstVariableDeclarationNode.h"
#include "BurstValueExpressionNode.h"
// These includes are placed below the definition of the 'BurstASTNode' type, as
// there's a good chance that one of the following files might require the use
// of the aforementioned type.
#include "BurstLiteralExpressionNode.h"
#include "BurstArithmeticExpressionNode.h"
#include "BurstReferenceExpressionNode.h"
#include "BurstFunctionDeclarationNode.h"

int ast_node_create
(
int astNodeType, // IN
int nodeType, // IN
void *pNode, // IN
BurstASTNode **ppASTNode // OUT
);
Expand Down
48 changes: 0 additions & 48 deletions Include/Frontend/Parser/AST/Nodes/BurstArithmeticExpressionNode.h

This file was deleted.

49 changes: 0 additions & 49 deletions Include/Frontend/Parser/AST/Nodes/BurstFunctionDeclarationNode.h

This file was deleted.

11 changes: 2 additions & 9 deletions Include/Frontend/Parser/AST/Nodes/BurstLiteralExpressionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <string.h>
#include <stdbool.h>

#include <assert.h>

#include "BurstCommons.h"
#include "BurstErrorCodes.h"
#include "BurstErrorMessages.h"
Expand All @@ -21,14 +19,9 @@
struct burstLiteralExpressionNode;
typedef struct burstLiteralExpressionNode
{
// TODO: Value Type

// TODO (Giga): Figure out how to accurately represent different datatypes
// within literal expressions.
char *pValueString;

int (*destroy)
(
struct burstLiteralExpressionNode *pNode
);
} BurstLiteralExpressionNode;

int literal_expression_node_create
Expand Down
43 changes: 0 additions & 43 deletions Include/Frontend/Parser/AST/Nodes/BurstReferenceExpressionNode.h

This file was deleted.

45 changes: 0 additions & 45 deletions Include/Frontend/Parser/AST/Nodes/BurstValueExpressionNode.h

This file was deleted.

46 changes: 0 additions & 46 deletions Include/Frontend/Parser/AST/Nodes/BurstVariableDeclarationNode.h

This file was deleted.

Loading