Compare commits
No commits in common. "72fa2127c8224e065bc8631b765364444fc49509" and "8d2f98aa5332aa3f7bea93f653da614b237bab9d" have entirely different histories.
72fa2127c8
...
8d2f98aa53
|
@ -104,7 +104,7 @@ int AssembleTree(struct ASTNode* Node, int Register, int ParentOp) {
|
||||||
return AsAddr(Node->Value.ID);
|
return AsAddr(Node->Value.ID);
|
||||||
|
|
||||||
case OP_DEREF:
|
case OP_DEREF:
|
||||||
return Node->RVal ? AsDeref(LeftVal, Node->Left->ExprType) : LeftVal;
|
return AsDeref(LeftVal, Node->Left->ExprType);
|
||||||
|
|
||||||
case OP_ASSIGN:
|
case OP_ASSIGN:
|
||||||
printf("Calculating for assignment..\r\n");
|
printf("Calculating for assignment..\r\n");
|
||||||
|
|
|
@ -75,7 +75,7 @@ void DumpTree(struct ASTNode* node, int level) {
|
||||||
case OP_GREATE: fprintf(stdout, "OP_GREATE\n"); return;
|
case OP_GREATE: fprintf(stdout, "OP_GREATE\n"); return;
|
||||||
case TERM_INTLITERAL: fprintf(stdout, "TERM_INTLITERAL %d\n", node->Value.IntValue); return;
|
case TERM_INTLITERAL: fprintf(stdout, "TERM_INTLITERAL %d\n", node->Value.IntValue); return;
|
||||||
case REF_IDENT:
|
case REF_IDENT:
|
||||||
if(node->RVal)
|
if(node->Right)
|
||||||
fprintf(stdout, "REF_IDENT rval %s\n", Symbols[node->Value.ID].Name);
|
fprintf(stdout, "REF_IDENT rval %s\n", Symbols[node->Value.ID].Name);
|
||||||
else
|
else
|
||||||
fprintf(stdout, "REF_IDENT %s\n", Symbols[node->Value.ID].Name);
|
fprintf(stdout, "REF_IDENT %s\n", Symbols[node->Value.ID].Name);
|
||||||
|
@ -85,8 +85,7 @@ void DumpTree(struct ASTNode* node, int level) {
|
||||||
case OP_RET: fprintf(stdout, "OP_RET\n"); return;
|
case OP_RET: fprintf(stdout, "OP_RET\n"); return;
|
||||||
case OP_CALL: fprintf(stdout, "OP_CALL %s\n", Symbols[node->Value.ID].Name); return;
|
case OP_CALL: fprintf(stdout, "OP_CALL %s\n", Symbols[node->Value.ID].Name); return;
|
||||||
case OP_ADDRESS: fprintf(stdout, "OP_ADDRESS %s\n", Symbols[node->Value.ID].Name); return;
|
case OP_ADDRESS: fprintf(stdout, "OP_ADDRESS %s\n", Symbols[node->Value.ID].Name); return;
|
||||||
case OP_DEREF:
|
case OP_DEREF: fprintf(stdout, "OP_DEREF\n"); return;
|
||||||
fprintf(stdout, "OP_DEREF %s\n", node->RVal ? "rval" : ""); return;
|
|
||||||
case OP_SCALE: fprintf(stdout, "OP_SCALE %s\n", TypeNames[node->Value.Size]); return;
|
case OP_SCALE: fprintf(stdout, "OP_SCALE %s\n", TypeNames[node->Value.Size]); return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -192,7 +192,6 @@ struct ASTNode* ParsePrecedenceASTNode(int PreviousTokenPrecedence) {
|
||||||
if(OpType == OP_ASSIGN) {
|
if(OpType == OP_ASSIGN) {
|
||||||
printf("\tParsePrecedenceASTNode: Assignment statement\r\n");
|
printf("\tParsePrecedenceASTNode: Assignment statement\r\n");
|
||||||
RightNode->RVal = 1;
|
RightNode->RVal = 1;
|
||||||
LeftNode->RVal = 0;
|
|
||||||
|
|
||||||
RightNode = MutateType(RightNode, LeftNode->ExprType, 0);
|
RightNode = MutateType(RightNode, LeftNode->ExprType, 0);
|
||||||
if(LeftNode == NULL)
|
if(LeftNode == NULL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user