Trying to do things with nom I started simple.
Having this in Cargo.toml
[dependencies]
nom = "4.0.0"
Here is main.rs
#[macro_use]
extern crate nom;
named!(blabla_parse<&[u8], &str>,
do_parse!(
g:tag!("blabla") >> g
)
);
fn main() {
let s1 = b"blabla";
println!("{:?}", blabla_parse(s1));
}
the compiler shouts at me like follows:
--> src/main.rs:4:1
|
4 | / named!(blabla_parse<&[u8], &str>,
5 | | do_parse!(
6 | | g:tag!("blabla") >> g
7 | | )
8 | | );
| |__^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
I have no idea what I'm doing wrong.