Did you ever try to translate one language into another? Usually it's just generating the AST that is the hard part, then you can just spit out code and let the compiler for the target language do the hard stuff.
AST generation is usually simple. It's the conversion to the other language that usually get's difficult.