
Summary: Pull node making into a separate module, make an "options" param for the make_ functions, and pull the different types of groups into separate functions. Test Plan: Open the homepage, make sure everything still works. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D3368
18 lines
405 B
JavaScript
18 lines
405 B
JavaScript
var parseTree = require("./parseTree");
|
|
var buildTree = require("./buildTree");
|
|
var utils = require("./utils");
|
|
var ParseError = require("./ParseError");
|
|
|
|
var process = function(toParse, baseNode) {
|
|
var tree = parseTree(toParse);
|
|
var node = buildTree(tree);
|
|
|
|
utils.clearNode(baseNode);
|
|
baseNode.appendChild(node);
|
|
};
|
|
|
|
module.exports = {
|
|
process: process,
|
|
ParseError: ParseError
|
|
};
|