Skip to main content

exit_line

Function exit_line 

Source
pub fn exit_line(line: &str) -> Option<ExitLine>
Expand description

Whether the only statement line holds is a call to exit, and in which of its two forms.

The prompt answers exit itself: the built-in of that name ends the process compiling the session, so a session holding the line would print nothing ever again. Reading the line from its tokens is what lets exit(code) leave with the value of code rather than only the forms whose status is written out.