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

@ -13,8 +13,6 @@
# { exact = "lo" } name == "lo"
# { prefix = "rmnet" } name.starts_with("rmnet")
# { prefix = "wlan", suffix = "digits" } starts_with + rest is 1+ ASCII digits
# { prefix = "seth_lte", suffix = "digits_optional" } starts_with + rest is 0+ ASCII digits
# { prefix = "v4-", suffix = "any" } starts_with + rest is 1+ any chars
# { contains = "vpn" } needle anywhere in name
#
# All matches are ASCII case-insensitive.