pub fn parse(text: &str) -> Result<Parsed<EngFile>, MotorError>Expand description
Reads a .eng file.
An entry with an error is skipped, with the error as a warning, when other entries in the file
read. The reader resumes at the next comment line. A comment naming the program that wrote the
file, the line write() puts first, ends an entry as any comment does but is not kept: so a
file read, written and read again holds the same comments.
§Errors
When no entry reads, the first entry’s error: MotorError::Syntax, with the line number,
for a header without seven fields, a bad number, a line that is neither a point nor a header,
an entry with no points, negative or decreasing time, a non-finite value, a non-positive
diameter or length, or a negative mass. A file with no entries at all is also an error.