
Summary: Add comments everywhere! Also fix some small bugs like using Style.id instead of Style.size, and rename some variables to be more descriptive. Fixes #22 Test Plan: - Make sure the huxley screenshots didn't change - Make sure the tests still pass Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D13158
18 lines
356 B
JavaScript
18 lines
356 B
JavaScript
/**
|
|
* Provides a single function for parsing an expression using a Parser
|
|
* TODO(emily): Remove this
|
|
*/
|
|
|
|
var Parser = require("./Parser");
|
|
|
|
/**
|
|
* Parses an expression using a Parser, then returns the parsed result.
|
|
*/
|
|
var parseTree = function(toParse) {
|
|
var parser = new Parser(toParse);
|
|
|
|
return parser.parse();
|
|
}
|
|
|
|
module.exports = parseTree;
|