
Summary: Make some tests that test the parser. So far, there are no DOM tests, but maybe later. Test Plan: Run `make serve` and then visit `/test/test.html`. Make sure all the tests pass. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D2987
14 lines
262 B
JavaScript
14 lines
262 B
JavaScript
var parser = require("./parser.jison");
|
|
parser.lexer = require("./lexer");
|
|
parser.yy = {
|
|
parseError: function(str) {
|
|
throw new Error(str);
|
|
}
|
|
};
|
|
|
|
var parseTree = function(toParse) {
|
|
return parser.parse(toParse);
|
|
}
|
|
|
|
module.exports = parseTree;
|