Streamline function pointers and currying.

This commit is contained in:
Stephen Chung
2020-10-17 13:49:16 +08:00
parent a16fc71935
commit 39474d6420
9 changed files with 171 additions and 132 deletions

View File

@@ -41,10 +41,7 @@ impl Expression<'_> {
/// If this expression is a variable name, return it. Otherwise `None`.
#[inline(always)]
pub fn get_variable_name(&self) -> Option<&str> {
match self.0 {
Expr::Variable(x) => Some((x.0).0.as_str()),
_ => None,
}
self.0.get_variable_access(true)
}
/// Get the expression.
#[inline(always)]