Add document to AST