Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,51 @@ | ||
int new_variable_node(char* name, int type) | ||
#include <stdio.h> | ||
#include "cdata.h" | ||
|
||
int new_variable_node(strucContx *ctx, char* name, int type) | ||
{ | ||
struct item_variable ivar; | ||
ivar.name = name; | ||
ivar.type = type; | ||
// calculate var size | ||
// cursor->insert_item | ||
return 0; | ||
} | ||
|
||
int new_pointer_node(char* name, int type) | ||
int new_pointer_node(strucContx *ctx, char* name, int type) | ||
{ | ||
struct item_pointer iptr; | ||
iptr.name = name; | ||
iptr.type = type; | ||
// calculate pointer size | ||
// cursor->insert_item | ||
return 0; | ||
} | ||
|
||
int new_array_node(char* name, int type, long size) | ||
int new_array_node(strucContx *ctx, char* name, int type, long size) | ||
{ | ||
struct item_array iarr; | ||
iarr.name = name; | ||
iarr.type = type; | ||
iarr.count = size; | ||
// calculate array size | ||
return 0; | ||
} | ||
|
||
int new_struct_node(char* name) | ||
int new_struct_node(strucContx *ctx, char* name) | ||
{ | ||
struct item_struct istr; | ||
istr.name = name; | ||
printf("Creating new structure \"%s\"\n", name); | ||
// cursor->insert_item | ||
// set cursor here | ||
return 0; | ||
} | ||
|
||
int new_union_node(char* name) | ||
int new_union_node(strucContx *ctx, char* name) | ||
{ | ||
//struct item_union iun; | ||
//iun.name = name; | ||
// cursor->insert_item | ||
// set cursor here | ||
return 0; | ||
} |