Open bjadamson opened 9 years ago
badamson@406c8f2a3866 ~/D/r/myproject-rs> rustc -v
rustc 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000)
Yeah that's a bug with the macros not properly namespacing the parsers. I'll have that fixed shortly.
Oh, okay. Thanks, is there any way to work around it in the meantime?
I just pushed a fix to master that should resolve the issue.
Ok I pulled in your patch (thanks btw!) and got this:
let p = or!(literal(A), literal(B));
<peruse macros>:3:5: 3:11 error: failed to resolve. Did you mean `self::peruse::parsers`?
<peruse macros>:3 ::peruse::parsers::OrParser{
^~~~~~
<peruse macros>:1:1: 18:2 note: in expansion of or!
/Users/badamson/Documents/rust/myproject-rs/src/lexer/lexer.rs:38:11: 38:39 note: expansion site
<peruse macros>:3:5: 3:32 error: `peruse::parsers::OrParser` does not name a structure
<peruse macros>:3 ::peruse::parsers::OrParser{
^~~~~~~~~~~~~~~~~~~~~~~~~~~
<peruse macros>:1:1: 18:2 note: in expansion of or!
/Users/badamson/Documents/rust/myproject-rs/src/lexer/lexer.rs:38:11: 38:39 note: expansion site
error: aborting due to 2 previous errors
Could not compile `myproject-rs`.
Very odd, I'm not able to reproduce this error. Try doing cargo clean
and then cargo build
. I've run into issues before when updating without doing a clean.
Tried it, no dice! I have this though, could you try it on your box? http://is.gd/ILt8I1
Weird, that works fine for me. The only changes I had to make to your code were add #![feature(plugin)]
at the top and a main fn. Also my Cargo.toml looks like:
[package]
name = "test"
version = "0.0.1"
authors = [ "Your name <you@example.com>" ]
[[bin]]
name = "test"
path = "src/test.rs"
[dependencies.peruse]
git = "https://github.com/DanSimon/peruse.git"
Also just a heads up, the latest Rust nightly just broke peruse because of the new enum namespacing, I'll have that fixed soon fixed.
Hey, I'm getting this error when trying to combine my own parser using any of the macros, do you have any ideas on maybe I'm doing incorrectly?
The full error I get from trying to compile this: