Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
/ veriwell Public archive

Commit

Permalink
fix: nested `define
Browse files Browse the repository at this point in the history
  • Loading branch information
amitrupu committed Nov 24, 2006
1 parent b1f3c76 commit 5efb6c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static int compiler_directive_or_macro(char *token)
commentCount = 0;
}
if (*p == '`') {
char *definition = p;
int definitionOffset = p - token_buffer; // amitrupu_fix: nested `define
for (*p = fin->fgetc();
isalnum(*p) || *p == '_' || *p == '$';
*p = fin->fgetc()) {
Expand All @@ -301,6 +301,7 @@ static int compiler_directive_or_macro(char *token)
}
fin->fungetc(*p);
*p = 0;
char *definition = token_buffer + definitionOffset;
expand_macro(definition);
/*fin__ = fin; */
depth++;
Expand Down

0 comments on commit 5efb6c8

Please sign in to comment.