Gate dead code for no_module.

This commit is contained in:
Stephen Chung
2022-01-29 11:09:43 +08:00
parent 225d9a6546
commit 6b02dde848
19 changed files with 556 additions and 282 deletions

View File

@@ -72,7 +72,9 @@ impl Expression<'_> {
#[must_use]
pub fn get_string_value(&self) -> Option<&str> {
match self.0 {
Expr::Variable(_, _, x) if x.1.is_none() => Some(x.2.as_str()),
#[cfg(not(feature = "no_module"))]
Expr::Variable(_, _, x) if x.1.is_some() => None,
Expr::Variable(_, _, x) => Some(x.2.as_str()),
Expr::StringConstant(x, _) => Some(x.as_str()),
_ => None,
}