INNER CODE UNIT · Rust
new
dontpanic92/OpenPAL3 · crosscom/ccidl-rs/src/lib.rs:454
fn new(input: &'a str) -> Self {
Self { input, pos: 0 }
}
fn parse(mut self) -> Result<CrossComIdl, String> {
let mut items = Vec::new();
let mut imports = Vec::new();
let mut modules = Vec::new();
while {
self.skip_ws();
!self.eof()
} {
let attrs = if self.peek_char() == Some('[') {
self.parse_attrs()?
} else {
Attrs::new()
};