doc: Add the lexer feature to the examples

The lexer feature bled into the examples due to `lalrpop-test` already
specifying it.

Fixes #513
This commit is contained in:
Markus Westerlind 2020-03-10 16:06:15 +01:00
parent a07f90289f
commit 037a37264c
4 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,11 @@ install:
script:
- RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 cargo build -p lalrpop
- RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 travis_wait cargo test --all --all-features
# Check the documentation examples separately so that the `lexer` feature specified in tests do not
# leak into them
- RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 cargo check -p calculator
- RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 cargo check -p pascal
- RUST_BACKTRACE=1 CARGO_INCREMENTAL=0 cargo check -p whitespace
- bash tools/build-doc
deploy:
provider: pages

View File

@ -8,6 +8,7 @@ workspace = "../.."
[build-dependencies.lalrpop]
version = "0.18.1"
path = "../../lalrpop"
features = ["lexer"]
[dependencies]
regex = "1"

View File

@ -6,6 +6,7 @@ build = "build.rs"
[build-dependencies.lalrpop]
path = "../../../lalrpop"
features = ["lexer"]
[dependencies]
docopt = "1.0"

View File

@ -1,6 +1,6 @@
For getting started with LALRPOP, it's probably best if you read
[the tutorial](tutorial/index.md), which will introduce you
to the syntax of LALRPOP files and so forth.
to the syntax of LALRPOP files and so forth.
But if you've done this before, or you're just the impatient sort,
here is a quick 'cheat sheet' for setting up your project. First, add
@ -24,6 +24,8 @@ regex = "1"
# Add a build-time dependency on the lalrpop library:
[build-dependencies]
lalrpop = "0.18.1"
# If you do not supply your own, external lexer you also need the `lexer` feature
# lalrpop = { version = "0.18.1", features = ["lexer"] }
```
Next create a `build.rs` file that looks like: