mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-19 07:51:08 +00:00
[qfcc] Accept @id as one token in macro bodies
I'm undecided about @ in macro names, but treating @id as one token in the body is necessary with the single-pass tokenizing. Fixes an infinite macro expansion loop in vecaddr.r (`#define dot @dot`), but that's really only a bandaid for *that* issue as there are plenty of other cases where macros will loop.
This commit is contained in:
parent
071e529b0e
commit
ab34cb7df4
1 changed files with 2 additions and 2 deletions
|
@ -246,7 +246,7 @@ pp_vnumber '({s}*{m}?{pp_number}){2,4}{s}*'{ULFD}?
|
|||
return tok;
|
||||
}
|
||||
} }
|
||||
<PREPROC,MACRO>{ID} { return PRE_ID; }
|
||||
<PREPROC>{ID} { return PRE_ID; }
|
||||
<PREPROC>{ID}\( { return PRE_IDp; }
|
||||
|
||||
<ARGS>\r*\n { next_line (yylloc, yyscanner); return -rua_space; }
|
||||
|
@ -265,7 +265,7 @@ pp_vnumber '({s}*{m}?{pp_number}){2,4}{s}*'{ULFD}?
|
|||
<PREEXPR>defined { return PRE_DEFINED; }
|
||||
<PREEXPR>{ID} { return PRE_ID; }
|
||||
|
||||
<INITIAL,ARGS>{
|
||||
<INITIAL,ARGS,MACRO>{
|
||||
{ID} |
|
||||
@{ID} { return -rua_id; }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue