Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser doesn't insert Missing where expected #30

Open
bengolds opened this issue Feb 15, 2022 · 1 comment
Open

Parser doesn't insert Missing where expected #30

bengolds opened this issue Feb 15, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@bengolds
Copy link

I've run into two more cases where I'd expect the parser to give an error by inserting Missing, akin to #28:

\\frac{x}{}=y parses as [ 'Multiply', [ 'Divide', 'x', '=' ], 'y' ]

\\sqrt{}=y parses as [ 'Multiply', [ 'Sqrt', '=' ], 'y' ]

Note that in both cases, if you have \placeholder inside of the empty brackets, it parses correctly:

\\frac{x}{\\placeholder}=y  parses as [ 'Equal', [ 'Divide', 'x', 'Missing' ], 'y' ]

\\sqrt{\\placeholder}=y parses as [ 'Equal', [ 'Sqrt', 'Missing' ], 'y' ]
@arnog arnog self-assigned this Feb 15, 2022
@arnog arnog added the bug Something isn't working label Feb 15, 2022
@strickinato
Copy link

Confirmed still an issue in 0.4.3

> c.parse("\\frac{x}{}=y").json
[ 'Multiply', [ 'Divide', 'x', '=' ], 'y' ]

> c.parse("\\sqrt{}=y").json
[ 'Multiply', [ 'Sqrt', '=' ], 'y' ]

> c.parse("\\frac{x}{\\placeholder}=y").json
[ 'Equal', [ 'Divide', 'x', 'Missing' ], 'y' ]

> c.parse("\\sqrt{\\placeholder}=y").json
[ 'Equal', [ 'Sqrt', 'Missing' ], 'y' ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants