Open generalmimon opened 2 months ago
I think the case List("kaitai_struct") =>
branch is actually never used for the stated purpose (the only scenario in which it is used is when someone names the top-level type kaitai_struct
as I did), because this is one of the only 2 occurrences of "kaitai_struct"
in the compiler codebase (the other one in RustTranslator.scala
looks basically the same). So it's probably a legacy of older code and is no longer used.
Totally agree. Moreover, I would contest removing just about anything in the codebase which does not result in any regression in the tests.
I ran into some suspicious code again -
PHPTranslator.scala:156-161
:Is this some kind of easter egg? In terms of language design, why couldn't a user name the top-level type
kaitai_struct
?A quick test confirms that
kaitai_struct
as/meta/id
really breaks things for PHP:kaitai_struc.ksy
kaitai_struct.ksy
Note: using KSC in revision
3c855b38