Skip to content

Fix parsing external function conditionals when they have zero arguments - #30

Open
Zacqary wants to merge 1 commit into
bladecoder:mainfrom
Zacqary:external-fn-fix
Open

Fix parsing external function conditionals when they have zero arguments#30
Zacqary wants to merge 1 commit into
bladecoder:mainfrom
Zacqary:external-fn-fix

Conversation

@Zacqary

@Zacqary Zacqary commented Jul 28, 2026

Copy link
Copy Markdown

Fixes a bladeink-compiler bug where

EXTERNAL has_key()
* {has_key()} Show this choice if has_key returns true

would compile correctly, but this wouldn't:

EXTERNAL has_key()
{has_key(): Unlocked.|Locked.}
-> DONE

In this specific case of inline conditionals, the compiler is always looking for internal functions and doesn't consider external. Interpolation works fine.

Functions with args don't seem to have been affected.

Found this bug using a pattern like this; bladeink would silently fail to insert extra_choices:

EXTERNAL show_extra()
-> main
=== main ===
<- base_choices
{ show_extra(): <- extra_choices }
+ [Leave]
    -> DONE
-> DONE
== base_choices ==
+ [Stay]
    -> DONE
== extra_choices ==
+ [Open the safe]
    -> DONE

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.

1 participant