Separate code printing and format config
Handle patterns and expressions