From: Wolfgang Bumiller Date: Wed, 24 Apr 2013 09:21:04 +0000 (+0200) Subject: recognize the simple case of __FUNC__ in the parser X-Git-Tag: before-library~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dcd65f18f8908dd9ee8eaa68974dcb87c8ae333e;p=xonotic%2Fgmqcc.git recognize the simple case of __FUNC__ in the parser --- diff --git a/parser.c b/parser.c index cc0d6f3..d480e1f 100755 --- a/parser.c +++ b/parser.c @@ -1888,6 +1888,8 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels) vec_push(parser->labels, lbl); } } + if (!var && !strcmp(parser_tokval(parser), "__FUNC__")) + var = (ast_expression*)parser_const_string(parser, parser->function->name, false); if (!var) { /* intrinsics */ if (!strcmp(parser_tokval(parser), "__builtin_debug_typestring")) {