Skip to content

Don't repeat CallInfo typedef in luacore.h#6

Open
bjornbm wants to merge 2 commits intopallene-lang:mainfrom
bjornbm:callinfo
Open

Don't repeat CallInfo typedef in luacore.h#6
bjornbm wants to merge 2 commits intopallene-lang:mainfrom
bjornbm:callinfo

Conversation

@bjornbm
Copy link

@bjornbm bjornbm commented Mar 10, 2025

Maybe the better alternative to pallene-lang/pallene#646


}

/^typedef struct CallInfo CallInfo;/ { next } # Skip repeated typedefs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is much better than the other PR.

The only nitpick is that we already have logic for skipping lines with an include. But here we're using "next" and there we're using "if not then print". I don't have a preference but it would be nice if they worked the same way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can offer this which is perhaps clearer in the logic:

/^typedef struct CallInfo CallInfo;/ { next }  # Skip repeated typedefs
is_core_include() { next }  # Skip includes for files being merged
{ print }  # Print all other lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants