diff --git a/src/bind.hpp b/src/bind.hpp index 67e2f36..d6eb252 100644 --- a/src/bind.hpp +++ b/src/bind.hpp @@ -16,10 +16,12 @@ namespace broma { one<'='>, sep, list, - sep, - tagged_rule> + sor, + sep, + tagged_rule> + >, tagged_rule> >, one<','>>, sep >, sor>> {}; @@ -49,13 +51,29 @@ namespace broma { } }; + template <> + struct run_action> { + template + static void apply(T& input, Root* root, ScratchData* scratch) { + auto text = input.string(); + + scratch->wip_has_explicit_inline = true; + for (auto& platform : {&scratch->wip_bind.imac, &scratch->wip_bind.m1, &scratch->wip_bind.ios, + &scratch->wip_bind.win, &scratch->wip_bind.android32, &scratch->wip_bind.android64}) { + if (*platform == 0) { // don't replace already specified ones + *platform = -2; + } + } + } + }; + template <> struct run_action>> { template static void apply(T& input, Root* root, ScratchData* scratch) { auto text = input.string(); - std::size_t out = -1; + std::ptrdiff_t out = -1; if (text == "default") { // special internal constant used for normalization // feel free to increment if needed (it isn't exposed anywhere public)