![]() Summary: Add correct parsing of optional arguments. Now, things like `\rule` can shift based on its argument, and parsing of `\sqrt[3]{x}` fails (correctly) because we don't support that yet. Also, cleaned up the lexing code a bit. There was a vestige of the old types in the lexer (they have now been completely moved to symbols.js). As a byproduct, this made it hard to call `expect("]")`, because it would look at the type of the Token and the type for "]" was "close". Now, all functions just look at the text of the parsed token, and in special occasions (like in the dimension lexer) it can return some data along with it. Test Plan: - Make sure tests still work, and new tests work - Make sure no huxley screenshots changed - Make EXTRA SURE `\sqrt[3]{x}` fails. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D13505 |
||
---|---|---|
.. | ||
huxley | ||
jasmine | ||
katex-spec.js | ||
test.html |