latexify_py
latexify_py copied to clipboard
Factor out expression codegen from function codegen
This PR does not add / remove any functionality, nor does it add / remove any tests. It's purely a refactor.
Overview
Split function_codegen into two files like so:
-
function_codegenthat implements visiting module and statements nodes, and delegates toexpression_codegenfor expression nodes. -
expression_codegenthat implements visiting expression nodes (as well asast.comprehension.
Considerations
How should we test function_codegen comprehensively? All tests that expression_codegen have will apply to function_codegen, at least for the time being.
References
Initial idea: https://github.com/google/latexify_py/issues/57#issuecomment-1322809961 Factor this change out of algorithmic codegen PR: https://github.com/google/latexify_py/pull/152#issuecomment-1341792122
Blocked by
None