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

Fix preprocessor expansion strategy #33

Merged
merged 13 commits into from
Oct 10, 2021

Commits on Oct 3, 2021

  1. Preprocessor: redesign the expansion strategy for macros

    The previous macro expansion implementation had several flaws regarding
    order and re-expansion logic. Those were fixed by a complete rewrite
    of the expandMacro() and its nested code paths.
    Also remove special handling for 'self' macros. In the future, the 'empty'
    macro will be removed as well.
    doppioandante committed Oct 3, 2021
    Configuration menu
    Copy the full SHA
    fec07ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    201abc5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3cbf372 View commit details
    Browse the repository at this point in the history
  4. Preprocessor: emulate gcc by not rescanning completely expanded token…

    …s at beginning
    
    These modifications strive for compatibility with gcc, but I'm not sure
    it is strictly mandated by the standard
    doppioandante committed Oct 3, 2021
    Configuration menu
    Copy the full SHA
    c71e994 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4b6f68b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6b54645 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    498c30a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1c9469d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    723cbd8 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2021

  1. Configuration menu
    Copy the full SHA
    6544dcf View commit details
    Browse the repository at this point in the history
  2. Preprocessor: apply suggestions from code review

    Mainly changes to the control flow of the macro expansion/rescan loop
    
    Co-authored-by: Veikka Tuominen <git@vexu.eu>
    doppioandante and Vexu committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    bedd6ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    31449f4 View commit details
    Browse the repository at this point in the history
  4. zig fmt

    doppioandante committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    e3e4ac4 View commit details
    Browse the repository at this point in the history