refactor out syntaxTree into ast-node-factory.js