JoelCourtney / parce

Create a syntax tree and parser in pure Rust
GNU General Public License v3.0
2 stars 0 forks source link

error: use of undeclared crate or module `parce_macros` #1

Open kristiannotari opened 3 years ago

kristiannotari commented 3 years ago

While trying to use your crate I get an error on the lexer macro.

error[E0433]: failed to resolve: use of undeclared crate or module `parce_macros`
 --> src\main.rs:3:1
  |
3 | #[lexer(BasicLexer)]
  | ^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `parce_macros`
  |
  = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

I only copy/pasted the example in your doc in a new binary project main.rs file:

use parce::prelude::*;

#[lexer(BasicLexer)]
enum BasicLexemes {
    A = "'a'",
    B = 'b',
    HelloWorld = " 'Hello World!' "
}

fn main() {
    assert!(BasicLexer::default().lex("aHello World!b").is_ok());
}

Using rust (stable): 1.53.0

JoelCourtney commented 2 years ago

Yikes, that's embarrassing. Thanks for pointing it out. I'll fix that and add a disclaimer that this project is incomplete. Sorry to lead you on :(