Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write .lst after the second pass. #375

Merged
merged 1 commit into from
Oct 24, 2018
Merged

Conversation

Y-Less
Copy link
Member

@Y-Less Y-Less commented Oct 4, 2018

What this PR does / why we need it:

This moves the -l code output to after the second pass, so that the generated code is the most accurate it can be.

Which issue(s) this PR fixes:

Fixes #116

What kind of pull this is:

  • A Bug Fix
  • A New Feature
  • Some repository meta (documentation, etc)
  • Other

Additional Documentation:

@Y-Less Y-Less requested a review from a team as a code owner October 4, 2018 15:04
@Southclaws
Copy link
Collaborator

I might revive my parser project because of this!

@AGraber
Copy link
Contributor

AGraber commented Oct 4, 2018

I think there should be a way to still print the first pass, through another flag of course.

@Southclaws
Copy link
Collaborator

Yes that would be useful for investigating exactly what the difference is with complex macros.

@Y-Less
Copy link
Member Author

Y-Less commented Oct 4, 2018

The only difference this makes to macros is code like this:

#if defined Hooked_OnPlayerConnect
    Hooked_OnPlayerConnect(playerid);
#endif

All other macros, unless you are doing very odd things with future definitions, will be the same. It doesn't replace at a later stage in macro replacement, those have always been atomic.

@Southclaws Southclaws merged commit 9a16724 into pawn-lang:dev Oct 24, 2018
@Southclaws
Copy link
Collaborator

Code looks fine to my (untrained) eyes, since I intend to work on a parser soon I wanted to get this in for the next version. I'll hopefully get around to testing this at the weekend.

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.

3 participants