aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/makefile/macro.rs11
-rw-r--r--src/makefile/macro_scope.rs20
2 files changed, 21 insertions, 10 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs
index fb0367b..d652fdb 100644
--- a/src/makefile/macro.rs
+++ b/src/makefile/macro.rs
@@ -1,4 +1,5 @@
use std::collections::HashMap;
+#[cfg(feature = "full")]
use std::collections::HashSet;
use std::env;
use std::fmt;
@@ -8,11 +9,11 @@ use std::io::BufRead;
#[cfg(feature = "full")]
use super::eval_context::DeferredEvalContext;
-use super::ItemSource;
-use super::{MacroScopeStack, TokenString};
+use super::{ItemSource, TokenString};
+#[cfg(feature = "full")]
+use super::MacroScopeStack;
+#[cfg(feature = "full")]
use eyre::Result;
-#[cfg(not(feature = "full"))]
-use regex::Regex;
#[derive(Debug, Clone)]
pub struct Macro {
@@ -253,6 +254,8 @@ mod test {
use super::*;
#[cfg(feature = "full")]
use crate::makefile::functions::NO_EVAL;
+ use crate::MacroScopeStack;
+ use eyre::Result;
type R = Result<()>;
diff --git a/src/makefile/macro_scope.rs b/src/makefile/macro_scope.rs
index 045d6f7..9edab95 100644
--- a/src/makefile/macro_scope.rs
+++ b/src/makefile/macro_scope.rs
@@ -1,15 +1,23 @@
-use super::eval_context::DeferredEvalContext;
-use super::functions;
-use super::token::Token;
-use super::{ItemSource, LookupInternal, Macro, MacroSet, TokenString};
-use eyre::Context;
-use lazy_static::lazy_static;
+
use std::borrow::Cow;
use std::collections::HashSet;
+#[cfg(feature = "full")]
use std::io::BufRead;
use std::iter;
use std::sync::RwLock;
+use eyre::Context;
+use lazy_static::lazy_static;
+#[cfg(not(feature = "full"))]
+use regex::Regex;
+
+#[cfg(feature = "full")]
+use super::eval_context::DeferredEvalContext;
+#[cfg(feature = "full")]
+use super::functions;
+use super::token::Token;
+use super::{ItemSource, LookupInternal, Macro, MacroSet, TokenString};
+
pub trait MacroScope {
/// Looks up the macro with the given name and returns it if it exists.
///