mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Plumbing for index and dot notations is working
This commit is contained in:
@@ -30,6 +30,8 @@ typedef enum NodeType {
|
||||
NODE_INCREMENT_POSTFIX,
|
||||
NODE_IMPORT,
|
||||
NODE_EXPORT,
|
||||
NODE_INDEX,
|
||||
NODE_DOT,
|
||||
} NodeType;
|
||||
|
||||
typedef struct NodeLiteral {
|
||||
@@ -124,6 +126,13 @@ typedef struct NodeImport {
|
||||
Literal alias;
|
||||
} NodeImport;
|
||||
|
||||
typedef struct NodeIndex {
|
||||
NodeType type;
|
||||
Node* first;
|
||||
Node* second;
|
||||
Node* third;
|
||||
} NodeIndex;
|
||||
|
||||
union _node {
|
||||
NodeType type;
|
||||
NodeLiteral atomic;
|
||||
@@ -140,6 +149,7 @@ union _node {
|
||||
NodePath path;
|
||||
NodeIncrement increment;
|
||||
NodeImport import;
|
||||
NodeIndex index;
|
||||
};
|
||||
|
||||
void freeNode(Node* node);
|
||||
@@ -157,4 +167,6 @@ void emitNodeFnCollection(Node** nodeHandle);
|
||||
void emitNodePath(Node** nodeHandle, NodeType type, Node* preClause, Node* postClause, Node* condition, Node* thenPath, Node* elsePath);
|
||||
void emitNodePrefixIncrement(Node** nodeHandle, Literal identifier, int increment);
|
||||
void emitNodePostfixIncrement(Node** nodeHandle, Literal identifier, int increment);
|
||||
void emitNodeImport(Node** nodeHandle, NodeType mode, Literal identifier, Literal alias);
|
||||
void emitNodeImport(Node** nodeHandle, NodeType mode, Literal identifier, Literal alias);
|
||||
void emitNodeIndex(Node** nodeHandle, Node* first, Node* second, Node* third);
|
||||
void emitNodeDot(Node** nodeHandle, Node* first);
|
||||
Reference in New Issue
Block a user