Re-add new constructor functions for ComponentCompiler and CompilerConfiguration

Amends commit dc51d4ccda

As discussed in #310
This commit is contained in:
Simon Hausmann 2021-07-12 13:26:17 +02:00
parent dc51d4ccda
commit 6e12b00b3f
2 changed files with 10 additions and 0 deletions

View file

@ -72,6 +72,11 @@ impl Default for CompilerConfiguration {
}
impl CompilerConfiguration {
/// Creates a new default configuration.
pub fn new() -> Self {
Self::default()
}
/// Create a new configuration that includes sets the include paths used for looking up
/// `.60` imports to the specified vector of paths.
pub fn with_include_paths(self, include_paths: Vec<std::path::PathBuf>) -> Self {

View file

@ -430,6 +430,11 @@ impl Default for ComponentCompiler {
}
impl ComponentCompiler {
/// Returns a new ComponentCompiler.
pub fn new() -> Self {
Self::default()
}
/// Sets the include paths used for looking up `.60` imports to the specified vector of paths.
pub fn set_include_paths(&mut self, include_paths: Vec<std::path::PathBuf>) {
self.config.include_paths = include_paths;