mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-28 06:01:02 +00:00
Option to keep output files in source tree
This commit is contained in:
parent
e7db1ee2e2
commit
7dc816b98c
@ -76,6 +76,20 @@ impl Configuration {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Write output files in the same directory of the input files.
|
||||||
|
///
|
||||||
|
/// If this option is enabled, you have to load the parser as a module:
|
||||||
|
///
|
||||||
|
/// ```no_run
|
||||||
|
/// mod parser; // synthesized from parser.lalrpop
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// This was the default behaviour up to version 0.15.
|
||||||
|
pub fn generate_in_source_tree(&mut self) -> &mut Self {
|
||||||
|
self.set_in_dir(Path::new("."))
|
||||||
|
.set_out_dir(Path::new("."))
|
||||||
|
}
|
||||||
|
|
||||||
/// If true, always convert `.lalrpop` files into `.rs` files, even if the
|
/// If true, always convert `.lalrpop` files into `.rs` files, even if the
|
||||||
/// `.rs` file is newer. Default is false.
|
/// `.rs` file is newer. Default is false.
|
||||||
pub fn force_build(&mut self, val: bool) -> &mut Configuration {
|
pub fn force_build(&mut self, val: bool) -> &mut Configuration {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user