Struct lalrpop::Configuration [−][src]
pub struct Configuration { /* fields omitted */ }
Configure various aspects of how LALRPOP works.
Intended for use within a build.rs
script.
To get the default configuration, use Configuration::new
.
Methods
impl Configuration
[src]
impl Configuration
pub fn new() -> Configuration
[src]
pub fn new() -> Configuration
Creates the default configuration; equivalent to Configuration::default
.
pub fn always_use_colors(&mut self) -> &mut Configuration
[src]
pub fn always_use_colors(&mut self) -> &mut Configuration
Always use ANSI colors in output, even if output does not appear to be a TTY.
pub fn never_use_colors(&mut self) -> &mut Configuration
[src]
pub fn never_use_colors(&mut self) -> &mut Configuration
Never use ANSI colors in output, even if output appears to be a TTY.
pub fn use_colors_if_tty(&mut self) -> &mut Configuration
[src]
pub fn use_colors_if_tty(&mut self) -> &mut Configuration
Use ANSI colors in output if output appears to be a TTY, but not otherwise. This is the default.
ⓘImportant traits for &'a mut Rpub fn set_in_dir<P>(&mut self, dir: P) -> &mut Self where
P: Into<PathBuf>,
[src]
pub fn set_in_dir<P>(&mut self, dir: P) -> &mut Self where
P: Into<PathBuf>,
Specify a custom directory to search for input files. This
directory is recursively searched for .lalrpop
files to be
considered as input files. This configuration setting also
impacts where output files are placed; paths are made relative
to the input path before being resolved relative to the output
path. By default, the input directory is the current working
directory.
ⓘImportant traits for &'a mut Rpub fn set_out_dir<P>(&mut self, dir: P) -> &mut Self where
P: Into<PathBuf>,
[src]
pub fn set_out_dir<P>(&mut self, dir: P) -> &mut Self where
P: Into<PathBuf>,
Specify a custom directory to use when writing output files. By default, the output directory is the same as the input directory.
ⓘImportant traits for &'a mut Rpub fn use_cargo_dir_conventions(&mut self) -> &mut Self
[src]
pub fn use_cargo_dir_conventions(&mut self) -> &mut Self
Apply cargo
directory location conventions, by setting the
input directory to src
and the output directory to
$OUT_DIR
.
ⓘImportant traits for &'a mut Rpub fn generate_in_source_tree(&mut self) -> &mut Self
[src]
pub fn generate_in_source_tree(&mut self) -> &mut 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:
mod parser; // synthesized from parser.lalrpop
This was the default behaviour up to version 0.15.
pub fn force_build(&mut self, val: bool) -> &mut Configuration
[src]
pub fn force_build(&mut self, val: bool) -> &mut Configuration
If true, always convert .lalrpop
files into .rs
files, even if the
.rs
file is newer. Default is false.
pub fn emit_comments(&mut self, val: bool) -> &mut Configuration
[src]
pub fn emit_comments(&mut self, val: bool) -> &mut Configuration
If true, emit comments into the generated code. This makes the generated code significantly larger. Default is false.
pub fn emit_report(&mut self, val: bool) -> &mut Configuration
[src]
pub fn emit_report(&mut self, val: bool) -> &mut Configuration
If true, emit report file about generated code.
pub fn log_quiet(&mut self) -> &mut Configuration
[src]
pub fn log_quiet(&mut self) -> &mut Configuration
Minimal logs: only for errors that halt progress.
pub fn log_info(&mut self) -> &mut Configuration
[src]
pub fn log_info(&mut self) -> &mut Configuration
Informative logs: give some high-level indications of progress (default).
pub fn log_verbose(&mut self) -> &mut Configuration
[src]
pub fn log_verbose(&mut self) -> &mut Configuration
Verbose logs: more than info, but still not overwhelming.
pub fn log_debug(&mut self) -> &mut Configuration
[src]
pub fn log_debug(&mut self) -> &mut Configuration
Debug logs: better redirect this to a file. Intended for debugging LALRPOP itself.
pub fn process(&self) -> Result<(), Box<Error>>
[src]
pub fn process(&self) -> Result<(), Box<Error>>
Process all files according to the set_in_dir
and
set_out_dir
configuration.
pub fn process_current_dir(&self) -> Result<(), Box<Error>>
[src]
pub fn process_current_dir(&self) -> Result<(), Box<Error>>
Process all files in the current directory, which -- unless you have changed it -- is typically the root of the crate being compiled.
pub fn process_dir<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<Error>>
[src]
pub fn process_dir<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<Error>>
Process all .lalrpop
files in path
.
pub fn process_file<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<Error>>
[src]
pub fn process_file<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<Error>>
Process the given .lalrpop
file.
Trait Implementations
impl Clone for Configuration
[src]
impl Clone for Configuration
fn clone(&self) -> Configuration
[src]
fn clone(&self) -> Configuration
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for Configuration
[src]
impl Default for Configuration
fn default() -> Configuration
[src]
fn default() -> Configuration
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Sync for Configuration