diff --git a/src/parser.c b/src/parser.c index b97beec..d2c91fc 100644 --- a/src/parser.c +++ b/src/parser.c @@ -23,9 +23,11 @@ Token* ParserExpect(TokenType type); Token* ParserExpectList(int count, ...); Token* ParserWant(TokenType type); void ParserExpectLineEnd(void); -void ParserSync(char* format, ...); -void ParserSyncExpect(TokenType expected, TokenType found); -void ParserSyncMessage(char* message); +//Some more on atrributes: +//https://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Function-Attributes.html#Function%20Attributes +void ParserSync(char* format, ...) __attribute__ ((noreturn)); +void ParserSyncExpect(TokenType expected, TokenType found) __attribute__ ((noreturn)); +void ParserSyncMessage(char* message) __attribute__ ((noreturn)); Instruction* ParserCreateInstruction(void); Instructions* ParseTokens(Array* tokens) { @@ -109,7 +111,7 @@ void ParserHandleMnemonic(Mnemonics mnemonic) { case ADD: inst->ParameterCount = 2; - PARSER_EXPECT_LIST(LineEnd, Colon, Comma); + ParserExpects(LineEnd, Colon, Comma); break; default: