chore(codegen): drop unused suffix forms digits_optional / any

Both forms came in with the codegen split (#91) but no [[vpn]]
rule has ever used them — the only `suffix=` rules are `digits`
(`wlan` test vector + `if` from #93). The grammar surface paid
for itself in ~150 lines of dead C/Rust helpers + their tests.

Drop them from VALID_KINDS, the parser, the C/Rust/Kotlin
emitters, and the helper test cases. If a future rule needs
either form, reintroduce alongside the rule that needs it.

Re-ran the codegen; tests pass for all four targets.
This commit is contained in:
okhsunrog 2026-04-26 05:16:18 +03:00
parent 3dd7130308
commit 9d8a54cfaa
5 changed files with 2 additions and 151 deletions

View file

@ -42,26 +42,6 @@ static inline bool vpnhide_iface_starts_with_then_digits_ci(
return true;
}
static inline bool vpnhide_iface_starts_with_then_digits_optional_ci(
const char *name, const char *prefix)
{
size_t i;
if (!vpnhide_iface_starts_with_ci(name, prefix))
return false;
for (i = strlen(prefix); name[i]; i++)
if (name[i] < '0' || name[i] > '9')
return false;
return true;
}
static inline bool vpnhide_iface_starts_with_then_any_ci(
const char *name, const char *prefix)
{
if (!vpnhide_iface_starts_with_ci(name, prefix))
return false;
return name[strlen(prefix)] != '\0';
}
static inline bool vpnhide_iface_equals_ci(
const char *name, const char *other)
{