Struct lalrpop::Configuration

source ·
pub struct Configuration { /* private fields */ }
Expand description

Configure various aspects of how LALRPOP works. Intended for use within a build.rs script. To get the default configuration, use Configuration::new.

Implementations§

Creates the default configuration; equivalent to Configuration::default.

Always use ANSI colors in output, even if output does not appear to be a TTY.

Never use ANSI colors in output, even if output appears to be a TTY.

Use ANSI colors in output if output appears to be a TTY, but not otherwise. This is the default.

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.

Specify a custom directory to use when writing output files. By default, the output directory is the same as the input directory.

Apply cargo directory location conventions, by setting the input directory to src and the output directory to $OUT_DIR.

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.

If true, always convert .lalrpop files into .rs files, even if the .rs file is newer. Default is false.

If true, emit comments into the generated code. This makes the generated code significantly larger. Default is false.

If false, shrinks the generated code by removing redundant white space. Default is true.

If true, emit report file about generated code.

Minimal logs: only for errors that halt progress.

Informative logs: give some high-level indications of progress (default).

Verbose logs: more than info, but still not overwhelming.

Debug logs: better redirect this to a file. Intended for debugging LALRPOP itself.

Sets the features used during compilation, disables the use of cargo features. (Default: Loaded from CARGO_FEATURE_{} environment variables).

Process all files according to the set_in_dir and set_out_dir configuration.

Process all files in the current directory, which – unless you have changed it – is typically the root of the crate being compiled.

Process all .lalrpop files in path.

Process the given .lalrpop file.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.