diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-06 15:23:21 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-06 15:23:21 -0600 |
commit | 64ba56eda176e22351331c76d78a7238c6e7189f (patch) | |
tree | d92acd788621543488efba1649e532b01052b9a7 /src/makefile/conditional.rs | |
parent | ec5fbe5227edc53bb02ac0896ac62e9e21f8e92a (diff) | |
download | makers-64ba56eda176e22351331c76d78a7238c6e7189f.tar.gz makers-64ba56eda176e22351331c76d78a7238c6e7189f.zip |
handle else ifs correctly
Diffstat (limited to 'src/makefile/conditional.rs')
-rw-r--r-- | src/makefile/conditional.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/makefile/conditional.rs b/src/makefile/conditional.rs index 989dfc9..95cab9e 100644 --- a/src/makefile/conditional.rs +++ b/src/makefile/conditional.rs @@ -168,7 +168,10 @@ impl Line { StateAction::Replace(State::SkippingUntilEndIf) } Some(State::SkippingUntilElseOrEndIf) => { - inner_condition.action(current_state, is_macro_defined, expand_macro)? + match inner_condition.action(current_state, is_macro_defined, expand_macro)? { + StateAction::Push(x) => StateAction::Replace(x), + x => x, + } } None => bail!("got an ElseIf but not in a conditional"), }, |