IMO, you want to do this, at least initially, in a language that has an AST that is built for user manipulation. That is to say, you want to prototype this in Lisp. Yes, Lisp has paredit. But that gives you a prototype that is most of the way there. Once you know the details of what it is like working in this environment, is when you implement it for another language. Just my two cents.