convert ASTs between LaserBat and SpiderMonkey formats