Fix build.

This commit is contained in:
Stephen Chung 2022-10-29 14:27:30 +08:00
parent 4100e6da64
commit 8e35f98477

View File

@ -77,7 +77,7 @@ impl AST {
#[cfg(not(feature = "no_function"))] functions: impl Into<crate::Shared<crate::Module>>, #[cfg(not(feature = "no_function"))] functions: impl Into<crate::Shared<crate::Module>>,
) -> Self { ) -> Self {
Self { Self {
source: Identifier::new_const(), source: None,
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
doc: crate::SmartString::new_const(), doc: crate::SmartString::new_const(),
body: StmtBlock::new(statements, Position::NONE, Position::NONE), body: StmtBlock::new(statements, Position::NONE, Position::NONE),
@ -114,7 +114,7 @@ impl AST {
pub(crate) fn new_with_source( pub(crate) fn new_with_source(
statements: impl IntoIterator<Item = Stmt>, statements: impl IntoIterator<Item = Stmt>,
#[cfg(not(feature = "no_function"))] functions: impl Into<crate::Shared<crate::Module>>, #[cfg(not(feature = "no_function"))] functions: impl Into<crate::Shared<crate::Module>>,
source: impl Into<Identifier>, source: impl Into<ImmutableString>,
) -> Self { ) -> Self {
let mut ast = Self::new( let mut ast = Self::new(
statements, statements,