ClojureDart icon indicating copy to clipboard operation
ClojureDart copied to clipboard

Add a "nano pass" to the compiler to perform statements lifting

Open cgrand opened this issue 1 year ago • 0 comments

Lifting statements out of expressions is a concern through all the compiler emit-* functions.

I propose we extract that concern into a distinct pass.

Currently we have

text -(reader)-> clj forms -(emit)-> dart-sexp -(write)-> dart text

where dart-sexp is our internal representation of the subset of dart we target.

With this proposal we would have

text -(reader)-> clj forms -(emit)-> dart-sexp -(lift)-> dart-sexp -(write)-> dart text

After lift the dart sexp representation would be guaranteed to be properly lifted and thus writeable.

cgrand avatar Nov 17 '23 14:11 cgrand