Change opcode/luxi showJSON generation in THH
Currently, the opcode and luxi "showJSON" functions generate directly a JSValue; in contrast, the object (single-constructor) types generate a 'toDict' function, and then `showJSON = makeObj . toDict`. This is useful, as the 'dict' form can be manipulated if needed. This patch changes the opcode and luxi types to behave the same; we generate a dict, and then (since this differs between opcodes and luxi) generate showJSON either as `makeObj . toDict` (for opcodes), or (for luxi) `showJSON . map sn . toDict`. The change is needed for MetaOpCode implementation. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Loading
Please register or sign in to comment