There's a couple of extensible preprocessors that aim to do exactly this. They're called 'clojure', 'scala', and 'kawa'.