author | unc0rr |
Thu, 05 Jan 2017 19:07:01 +0300 | |
changeset 12135 | 6273f89ab13d |
child 12136 | a4d22f197bd2 |
permissions | -rw-r--r-- |
12135 | 1 |
use std::str; |
2 |
||
3 |
use super::messages::HWProtocolMessage::*; |
|
4 |
use super::messages::HWProtocolMessage; |
|
5 |
||
6 |
grammar; |
|
7 |
||
8 |
pub ProtocolMessage: HWProtocolMessage<'input> = { |
|
9 |
"NICK" <s:Str> => Nick(s), |
|
10 |
}; |
|
11 |
||
12 |
Str: &'input str = { |
|
13 |
<s:r"[^\n]\n"> => s, |
|
14 |
}; |
|
15 |
||
16 |
||
17 |
//Num32: i32 = <s:r"[0-9]+"> => i32::from_str(s).unwrap(); |