-
Notifications
You must be signed in to change notification settings - Fork 2
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 tail rec #175
base: master
Are you sure you want to change the base?
Parser tail rec #175
Conversation
Result is not really used, therefore getting rid of it.
It's a problem with file includes, think it is windows only? It changes every time they update Vs code :( |
What should we doooooo? |
For testing your PR you can see if fmark.example works without a file include! And we'll fix that issue later :( |
No luck. Even with only one line of normal text. |
Hmm, did you actually managed to make it tail recursive though? I can test it out later if it works on my linux |
I tried it on Linux, the debug console said js-beauty not found. |
Ahh ok, yeah, when testing you have to use This is in the VSCode repo though. |
I did |
Did you check the debug log? Were there still no errors there? That is very weird. I ll have a look at it as soon as I have time, which should be end of next week. |
@ThunderMikey parser is now tail recursive? nice |
Yeah, just don't know whether the other issues has been solved or not. |
Did we get anywhere with figuring out the bug with this? Does the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add a test that parses a large markdown file, like 10000 lines, and hopefully completes under 1sec and does not crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThunderMikey, you removed a lot of |> Ok
, result.map
, & result.bind
/makeOk
in the code.
Could you explain why? Did you replace with an equivalent, or are results no longer needed because the functions "won't fail" / don't have a fail condition?
@ps-george If I recall correctly, I did not want the function to fail, at the very least, fmark will spit something even though the text is malformatted. We can probably improve this by having different states (error states will be used to inform the user) while spitting the text. |
Make parser tail recursive in order to parse longer Markdown files.