Fix feature builds.
This commit is contained in:
parent
f8b36a470a
commit
e5b345bca4
@ -684,10 +684,9 @@ impl AST {
|
||||
}
|
||||
/// Recursively walk the [`AST`], including function bodies (if any).
|
||||
#[cfg(not(feature = "internals"))]
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
#[inline(always)]
|
||||
pub(crate) fn walk(&self, on_node: &mut impl FnMut(&[ASTNode])) {
|
||||
let mut path = Default::default();
|
||||
|
||||
self.statements()
|
||||
.iter()
|
||||
.chain({
|
||||
@ -700,15 +699,13 @@ impl AST {
|
||||
crate::stdlib::iter::empty()
|
||||
}
|
||||
})
|
||||
.for_each(|stmt| stmt.walk(&mut path, on_node));
|
||||
.for_each(|stmt| stmt.walk(&mut Default::default(), on_node));
|
||||
}
|
||||
/// _(INTERNALS)_ Recursively walk the [`AST`], including function bodies (if any).
|
||||
/// Exported under the `internals` feature only.
|
||||
#[cfg(feature = "internals")]
|
||||
#[inline(always)]
|
||||
pub fn walk(&self, on_node: &mut impl FnMut(&[ASTNode])) {
|
||||
let mut path = Default::default();
|
||||
|
||||
self.statements()
|
||||
.iter()
|
||||
.chain({
|
||||
@ -721,7 +718,7 @@ impl AST {
|
||||
crate::stdlib::iter::empty()
|
||||
}
|
||||
})
|
||||
.for_each(|stmt| stmt.walk(&mut path, on_node));
|
||||
.for_each(|stmt| stmt.walk(&mut Default::default(), on_node));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1963,7 +1963,7 @@ impl Engine {
|
||||
/// ));
|
||||
///
|
||||
/// let mut ast = engine.compile(r#"let x = "hello"; debug(x);"#)?;
|
||||
/// ast.set_source(Some("world"));
|
||||
/// ast.set_source("world");
|
||||
/// engine.consume_ast(&ast)?;
|
||||
///
|
||||
/// assert_eq!(*result.read().unwrap(), r#"world @ 1:18 > "hello""#);
|
||||
|
Loading…
Reference in New Issue
Block a user