Restricted commit b9a3c78888 to classic-style Assembly macros.
.include will work at expansion-time for .define macros.
This commit is contained in:
@@ -438,9 +438,7 @@ void MacDef (unsigned Style)
|
|||||||
|
|
||||||
/* Parse the parameter list */
|
/* Parse the parameter list */
|
||||||
if (HaveParams) {
|
if (HaveParams) {
|
||||||
|
|
||||||
while (CurTok.Tok == TOK_IDENT) {
|
while (CurTok.Tok == TOK_IDENT) {
|
||||||
|
|
||||||
/* Create a struct holding the identifier */
|
/* Create a struct holding the identifier */
|
||||||
IdDesc* I = NewIdDesc (&CurTok.SVal);
|
IdDesc* I = NewIdDesc (&CurTok.SVal);
|
||||||
|
|
||||||
@@ -449,6 +447,7 @@ void MacDef (unsigned Style)
|
|||||||
M->Params = I;
|
M->Params = I;
|
||||||
} else {
|
} else {
|
||||||
IdDesc* List = M->Params;
|
IdDesc* List = M->Params;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (SB_Compare (&List->Id, &CurTok.SVal) == 0) {
|
if (SB_Compare (&List->Id, &CurTok.SVal) == 0) {
|
||||||
Error ("Duplicate symbol '%m%p'", &CurTok.SVal);
|
Error ("Duplicate symbol '%m%p'", &CurTok.SVal);
|
||||||
@@ -490,9 +489,8 @@ void MacDef (unsigned Style)
|
|||||||
** the .LOCAL command is detected and removed, at this time.
|
** the .LOCAL command is detected and removed, at this time.
|
||||||
*/
|
*/
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
/* Check for include */
|
/* Check for include */
|
||||||
if (CurTok.Tok == TOK_INCLUDE) {
|
if (CurTok.Tok == TOK_INCLUDE && Style == MAC_STYLE_CLASSIC) {
|
||||||
/* Include another file */
|
/* Include another file */
|
||||||
NextTok ();
|
NextTok ();
|
||||||
/* Name must follow */
|
/* Name must follow */
|
||||||
@@ -529,9 +527,7 @@ void MacDef (unsigned Style)
|
|||||||
|
|
||||||
/* Check for a .LOCAL declaration */
|
/* Check for a .LOCAL declaration */
|
||||||
if (CurTok.Tok == TOK_LOCAL && Style == MAC_STYLE_CLASSIC) {
|
if (CurTok.Tok == TOK_LOCAL && Style == MAC_STYLE_CLASSIC) {
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
IdDesc* I;
|
IdDesc* I;
|
||||||
|
|
||||||
/* Skip .local or comma */
|
/* Skip .local or comma */
|
||||||
@@ -570,6 +566,7 @@ void MacDef (unsigned Style)
|
|||||||
if (CurTok.Tok == TOK_IDENT) {
|
if (CurTok.Tok == TOK_IDENT) {
|
||||||
unsigned Count = 0;
|
unsigned Count = 0;
|
||||||
IdDesc* I = M->Params;
|
IdDesc* I = M->Params;
|
||||||
|
|
||||||
while (I) {
|
while (I) {
|
||||||
if (SB_Compare (&I->Id, &CurTok.SVal) == 0) {
|
if (SB_Compare (&I->Id, &CurTok.SVal) == 0) {
|
||||||
/* Local param name, replace it */
|
/* Local param name, replace it */
|
||||||
|
|||||||
Reference in New Issue
Block a user