tianocore / edk2-pytool-library

Python library package that supports UEFI development
Other
56 stars 45 forks source link

base_parser.py: support conditions checking for empty string #653

Closed apop5 closed 4 weeks ago

apop5 commented 1 month ago

base_parser.py did not support conditional directives that were comparing to empty strings (e.g. !if $(MY_VAL) == "", !if $(MY_VAL) != "". The logic in_TokenizeConditional, was settingmodeto QUOTE_MODE twice because the token length was zero for an empty quote (len(token) == 0`).

This PR Updates the logic to not enter QUOTE_MODE when its already in QUOTE_MODE, and to fall over to end of QUOTE_MODE.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.43%. Comparing base (ce85203) to head (d9d389b). Report is 121 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #653 +/- ## ========================================== - Coverage 81.43% 81.43% -0.01% ========================================== Files 56 45 -11 Lines 7514 7492 -22 ========================================== - Hits 6119 6101 -18 + Misses 1395 1391 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.