vault 11.0.1

A parser for Company of Heroes replay files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::data::ticks::{CommandTick, MessageTick};
use crate::data::{ParserResult, Span};
use nom::branch::alt;

#[derive(Debug)]
pub enum Tick {
    Command(CommandTick),
    Message(MessageTick),
}

impl Tick {
    pub fn parse(input: Span) -> ParserResult<Tick> {
        alt((CommandTick::parse_tick, MessageTick::parse_tick))(input)
    }
}