diff --git a/src/parser.c b/src/parser.c index 538dd9d..be2f874 100644 --- a/src/parser.c +++ b/src/parser.c @@ -88,10 +88,15 @@ a64inst_instruction *parser(char asmLine[]){ if(strcmp(opcode, ".int") == 0){ //type is directive + instr->type = a64inst_DIRECTIVE; } else if(strcmp(opcode[strlen(opcode)-1], ":") == 0) { //type is label //add to symbol table + instr->type = a64inst_LABEL; + char *opcodeCpy = strdup(opcode); + char *labelData = strtok(opcodeCpy, ":"); + instr->data.label = labelData; } else { //type is instruction int operandCount = 0;