fn parse_char(self, offset: usize, c: char) -> Self {
        use State::*;
        match self {
            Start => match c {
                ' ' => Start,
                '#' => Comment,
                ':' if offset > 0 => KeyColon(offset),
                ':' => Error(ParseError::MissingKey),
                '"' => KeyQuotedOdd(false),
                _ => KeyNotQuoted,
            },
            KeyNotQuoted => match c {
                ':' => KeyColon(offset),
                _ => KeyNotQuoted,
            },
            KeyQuotedOdd(b) => match c {
                '"' => KeyQuotedEven(b),
                _ => KeyQuotedOdd(true),
            },
            KeyQuotedEven(b) => match c {
                '"' => KeyQuotedOdd(true), // doubled quote
                ':' if b => KeyColon(offset),
                _ => Error(ParseError::InvalidSeparator),
            },
            KeyColon(off) => match c {
                ' ' => DefDone(off, Separator::Normal),
                '>' => DefDone(off, Separator::TextAppend),
                '=' => DefDone(off, Separator::TextValue),
                _ => Error(ParseError::InvalidSeparator),
            },
            _ => self,
        }
    }
/// Parse one character
///
/// `offset` Byte offset for character
/// `c` Character to parse
Parse one character
`offset` Byte offset for character
`c` Character to parse
Parse one character ` offset ` Byte offset for character ` c ` Character to parse
fn parse_char(self, offset: usize, c: char) -> Self {
        use State::*;
        match self {
            Start => match c {
                ' ' => Start,
                '#' => Comment,
                ':' if offset > 0 => KeyColon(offset),
                ':' => Error(ParseError::MissingKey),
                '"' => KeyQuotedOdd(false),
                _ => KeyNotQuoted,
            },
            KeyNotQuoted => match c {
                ':' => KeyColon(offset),
                _ => KeyNotQuoted,
            },
            KeyQuotedOdd(b) => match c {
                '"' => KeyQuotedEven(b),
                _ => KeyQuotedOdd(true),
            },
            KeyQuotedEven(b) => match c {
                '"' => KeyQuotedOdd(true), // doubled quote
                ':' if b => KeyColon(offset),
                _ => Error(ParseError::InvalidSeparator),
            },
            KeyColon(off) => match c {
                ' ' => DefDone(off, Separator::Normal),
                '>' => DefDone(off, Separator::TextAppend),
                '=' => DefDone(off, Separator::TextValue),
                _ => Error(ParseError::InvalidSeparator),
            },
            _ => self,
        }
    }
fn parse_char ( self , offset : usize , c : char ) -> Self { use State :: * ; match self { Start => match c { ' ' => Start , '#' => Comment , ':' if offset > 0 => KeyColon ( offset ) , ':' => Error ( ParseError :: MissingKey ) , '"' => KeyQuotedOdd ( false ) , _ => KeyNotQuoted , } , KeyNotQuoted => match c { ':' => KeyColon ( offset ) , _ => KeyNotQuoted , } , KeyQuotedOdd ( b ) => match c { '"' => KeyQuotedEven ( b ) , _ => KeyQuotedOdd ( true ) , } , KeyQuotedEven ( b ) => match c { '"' => KeyQuotedOdd ( true ) , // doubled quote ':' if b => KeyColon ( offset ) , _ => Error ( ParseError :: InvalidSeparator ) , } , KeyColon ( off ) => match c { ' ' => DefDone ( off , Separator :: Normal ) , '>' => DefDone ( off , Separator :: TextAppend ) , '=' => DefDone ( off , Separator :: TextValue ) , _ => Error ( ParseError :: InvalidSeparator ) , } , _ => self , } }
Parse one character
`offset` Byte offset for character
`c` Character to parse
Parse one character ` offset ` Byte offset for character ` c ` Character to parse
self
offset
usize
c
char