Add statement assembly functions

This PR introduces some functions for statement assembly.
Targets #284.
`static` missing.