Function oursh::program::parse [−][src]
pub fn parse<P: Program, R: BufRead>(reader: R) -> Result<P>
Expand description
Parse a program of the given type.
Examples
use oursh::program::{parse, PosixProgram, BasicProgram}; let program = b"sleep 1; date & date"; assert!(parse::<PosixProgram, &[u8]>(program).is_ok());