zesterer / chumsky

Write expressive, high-performance parsers with ease.
https://crates.io/crates/chumsky
MIT License
3.62k stars 156 forks source link

Can't build example #597

Closed fprasx closed 9 months ago

fprasx commented 9 months ago

I've copied the nanorust example into my main.rs and this is my Cargo.toml:

[dependencies]
ariadne = "0.4.0"
chumsky = "0.9.3"

but I'm getting compilation errors like:

   Compiling fprasx-sunscreen v0.1.0 (/Users/fpx/code/rust/fprasx-sunscreen)
error[E0433]: failed to resolve: could not find `ascii` in `text`
  --> src/main.rs:75:23
   |
75 |     let ident = text::ascii::ident().map(|ident: &str| match ident {
   |                       ^^^^^ could not find `ascii` in `text`

error[E0433]: failed to resolve: could not find `input` in `chumsky`
   --> src/main.rs:186:14
    |
186 |     chumsky::input::SpannedInput<Token<'src>, Span, &'tokens [(Token<'src>, Span)]>;
    |              ^^^^^ could not find `input` in `chumsky`

error[E0412]: cannot find type `SimpleSpan` in this scope
  --> src/main.rs:10:17
   |
10 | pub type Span = SimpleSpan<usize>;
   |                 ^^^^^^^^^^ not found in this scope

Could anyone point me to what I'm doing wrong?

zesterer commented 9 months ago

See #456.