Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JavaScriptSG: fix broken generation of enum literals
Related to kaitai-io/kaitai_struct#1074 Until this commit, any generated JS test spec from a `.kst` file containing an enum literal would have a syntax error because of lines like `const ./Enum0 = require(...);`. It seems that this bug exists since 66e75b3. In that commit, I tried to fix the build error of KST translator due to the compiler API change in kaitai-io/kaitai_struct_compiler@8007e0e#diff-6164bdf7b558cea6ff36b4a50508205a4569f8e98e398e77c4373679fceafffa. In JavaScriptSG, I just passed the existing `importList` to JavaScriptTranslator without thinking about the consequences (which were exactly the illegal `const ./Enum0 = require(...);` lines). This should now be fixed.
- Loading branch information