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(sem): crash on unmatched immediate routines #929

Commits on Sep 27, 2023

  1. ## Summary

    Unmatched `immediate` `macro`s and `template`s within a generic context
    no longer result in a compiler error.
    
    ## Details
    
    Immediate macros and templates are not dispatched via `sigmatch` and
    instead `semgnrc` directly calls `evaltempl.evalTemplate`, in turn
    `evalTemplateArgs` is called which can produce an error if an incorrect
    number of arguments are provided. `evalTemplateArgs` is also used by
    `semMacroExpr`, so similar issues would also exist for macros.
    
    Now the error from `evalTemplateArgs` is immediately returned by
    `evalTemplate` and treated as a mismatch in `semgnrc.semGenericStmt`.
    Doing so prevents a compiler crash, attempt to access the sons of an error
    node. A test has been added as part of this change, which was originally
    from: zevv/npeg#68 (comment)
    saem committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    1ff71c9 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. rename and describe test

    saem committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ce12a40 View commit details
    Browse the repository at this point in the history