-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Uncaught Error: toAST() expects a succesfull MatchResult as first parameter, but the MatchResult is successful #363
Comments
I wasn't able to reproduce this. Can you give me some more details about how are importing Ohm (e.g., It sounds like the problem is that there are two different instances of the module. |
I am importing it using |
@nailuj29 Can you show me exactly how you are importing and using it? If you give me the code it's much easier for me to try to reproduce. Also, what does your tsconfig look like? That could make a difference. |
Ok, I was able to reproduce the problem as follows:
@nailuj29, is this similar to how you are using it? |
Yes, that is what I am doing |
I am creating an app that uses Ohm, and when trying to get an AST with the
toAST
function. However, I get an error statingtoAST() expects a succesfull MatchResult as first parameter, but the MatchResult is successful
I believe this is an error with theinstanceof
in the code, becausesemanticsForToAST
fails similarly, and theMatchResult
is successfulThe text was updated successfully, but these errors were encountered: