gameServer2/src/protocol/hwprotocol.lalrpop
author unc0rr
Thu, 05 Jan 2017 19:07:01 +0300
changeset 12130 6273f89ab13d
child 12131 a4d22f197bd2
permissions -rw-r--r--
Start on messages parser

use std::str;

use super::messages::HWProtocolMessage::*;
use super::messages::HWProtocolMessage;

grammar;

pub ProtocolMessage: HWProtocolMessage<'input> = {
    "NICK" <s:Str> => Nick(s),
};

Str: &'input str = {
    <s:r"[^\n]\n"> => s,
};


//Num32: i32 = <s:r"[0-9]+"> => i32::from_str(s).unwrap();