latexify_py icon indicating copy to clipboard operation
latexify_py copied to clipboard

Factor out expression codegen from function codegen

Open ZibingZhang opened this issue 3 years ago • 0 comments

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_codegen that implements visiting module and statements nodes, and delegates to expression_codegen for expression nodes.
  • expression_codegen that implements visiting expression nodes (as well as ast.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

ZibingZhang avatar Dec 08 '22 12:12 ZibingZhang