-
Notifications
You must be signed in to change notification settings - Fork 1
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
Run code blocks #22
Run code blocks #22
Conversation
NotFound, | ||
Error(SearchError) |
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.
isn't NotFound
a kind of Error ?
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.
It can be. But Errors are differently managed where the search is queried. if found or not found, the function continue to run, but if it is an Error, it returns.
At first, SearchStatus
was a Result<Option<Box<dyn Program>, SearchError>
. As you can see, this is pretty much the same structure.
Improvements
From #21 : Run code blocks
Ask for execute code from block if the language is specified after the three backticks.
Supported languages:
Add a flag :
-r, --run <RUN>
: Run code block if the language is supportedPossible values:
no
: Doesn't run anythingask
: Ask to run codeforce
: Run code without askingdefault to
no
From #23 : Replace lazy_static to once_cell crate
New engine
from-file
Using this new engine, you can read file and interpret it like it comes from AI. Useful for debugging or testing.
Example: