-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Restructured how commands like list
, help
, quit
are parsed to implement save
#555
Commits on Sep 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 47fd928 - Browse repository at this point
Copy the full SHA 47fd928View commit details -
Implemented commands like
list
,help
,save
(new) with more flex……ible parsing (eg tolerant of arbitrary whitespace) Commands report `ParseError`s if the syntax is invalid (eg too many or not enough args) This required making `Resolver::add_code_source` public and adding `Context::resolver_mut` to track source code positions of commands
Configuration menu - View commit details
-
Copy full SHA for 34d43a3 - Browse repository at this point
Copy the full SHA 34d43a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d45512 - Browse repository at this point
Copy the full SHA 2d45512View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a0ff28 - Browse repository at this point
Copy the full SHA 5a0ff28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e89134 - Browse repository at this point
Copy the full SHA 3e89134View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1318619 - Browse repository at this point
Copy the full SHA 1318619View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ef2f8b - Browse repository at this point
Copy the full SHA 9ef2f8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 314ad41 - Browse repository at this point
Copy the full SHA 314ad41View commit details
Commits on Sep 8, 2024
-
Passed
code_source_id
toparse_command
instead of aResolver
Note that there is a bug where non-command inputs run `add_course_source` twice, which leads to incorrect line numbers
Configuration menu - View commit details
-
Copy full SHA for 4615178 - Browse repository at this point
Copy the full SHA 4615178View commit details -
Made struct
CommandParser
and reimplemented command parsing in term……s of it (much cleaner)
Configuration menu - View commit details
-
Copy full SHA for 32bf547 - Browse repository at this point
Copy the full SHA 32bf547View commit details -
Fixed bug where
resolver.add_code_source
was run twice per non-comm……and input How: split `CommandParser` into a second struct, `SourcelessCommandParser`, that contains just the input, no `code_source_id` `SourcelessCommandParser` has a fallible initializer that only returns `Some(Self)` if the line is indeed a command (ie starts with a command word) Then we simply check if this initializer succeeded; if so then make a new `code_source_id` and construct the full `CommandParser`, then parse the command
Configuration menu - View commit details
-
Copy full SHA for 01ab601 - Browse repository at this point
Copy the full SHA 01ab601View commit details -
Enum-ified command kind, making it strongly typed (no need for `unrea…
…chable!`) Made "list" report incorrect number of args before reporting invalid arg, in the event that both errors were present
Configuration menu - View commit details
-
Copy full SHA for 2723c14 - Browse repository at this point
Copy the full SHA 2723c14View commit details -
Changed
InvalidCommand
to take aString
instead of&'static str
Replaced `ensure_zero_args!` macro with function, now that this is possible (since we can use `format!` instead of `concat!)
Configuration menu - View commit details
-
Copy full SHA for f929215 - Browse repository at this point
Copy the full SHA f929215View commit details -
Replaced trailing space characters in two tests with
\x20
to preven……t them from being removed when removing trailing whitespace on save
Configuration menu - View commit details
-
Copy full SHA for 336eeca - Browse repository at this point
Copy the full SHA 336eecaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cd8c56 - Browse repository at this point
Copy the full SHA 4cd8c56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fed904 - Browse repository at this point
Copy the full SHA 6fed904View commit details
Commits on Sep 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1f34d27 - Browse repository at this point
Copy the full SHA 1f34d27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 50dd0fd - Browse repository at this point
Copy the full SHA 50dd0fdView commit details -
Simplified history implementation, at the cost of one allocation when…
… reading prelude
Configuration menu - View commit details
-
Copy full SHA for 6b1a863 - Browse repository at this point
Copy the full SHA 6b1a863View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac1bd61 - Browse repository at this point
Copy the full SHA ac1bd61View commit details
Commits on Sep 17, 2024
-
Moved pushing to session history out of
parse_and_evaluate
and into…… `run_repl` Therefore changed `parse_and_evalute` to return a struct of `control_flow, errored` to let session history know whether the command in question errored Added tests to `session_history.rs` Code seems overall not terrible now
Configuration menu - View commit details
-
Copy full SHA for f89083e - Browse repository at this point
Copy the full SHA f89083eView commit details
Commits on Sep 18, 2024
-
Replaced boolean
errored
with isomorphic but clearer `Result<(), ()……>` and renamed some items accordingly
Configuration menu - View commit details
-
Copy full SHA for 8f2a804 - Browse repository at this point
Copy the full SHA 8f2a804View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4e6c37 - Browse repository at this point
Copy the full SHA e4e6c37View commit details
Commits on Sep 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for efb7250 - Browse repository at this point
Copy the full SHA efb7250View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea859dd - Browse repository at this point
Copy the full SHA ea859ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20d6815 - Browse repository at this point
Copy the full SHA 20d6815View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f987a2 - Browse repository at this point
Copy the full SHA 3f987a2View commit details -
Merge branch 'session-history' into commands
Improved save logic: allowed for 0 arguments, in which case session history will be saved to history.nbt Printed message on successful save
Configuration menu - View commit details
-
Copy full SHA for 87b0812 - Browse repository at this point
Copy the full SHA 87b0812View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0361a9 - Browse repository at this point
Copy the full SHA b0361a9View commit details
Commits on Sep 22, 2024
-
Removed
ls
as alias for commandlist
in web version for consisten……cy with CLI Updated web docs
Configuration menu - View commit details
-
Copy full SHA for 8a278bc - Browse repository at this point
Copy the full SHA 8a278bcView commit details -
Replaced
CommandKind::new
withimpl FromStr for CommandKind
(isom……orphic but more self-descriptive)
Configuration menu - View commit details
-
Copy full SHA for 5c55c45 - Browse repository at this point
Copy the full SHA 5c55c45View commit details
Commits on Sep 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ab4205e - Browse repository at this point
Copy the full SHA ab4205eView commit details