From c58b52f2cb42105ef2a7d25e313e9cdcdee938e8 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Tue, 21 Feb 2023 18:03:21 +0800 Subject: [PATCH] Fix builds. --- src/ast/ast.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ast/ast.rs b/src/ast/ast.rs index bff66b1d..8a23d96e 100644 --- a/src/ast/ast.rs +++ b/src/ast/ast.rs @@ -252,7 +252,10 @@ impl AST { #[inline(always)] #[must_use] pub(crate) fn statements(&self) -> &[Stmt] { - self.body.statements() + self.body + .as_deref() + .map(StmtBlock::statements) + .unwrap_or_default() } /// _(internals)_ Get the statements. /// Exported under the `internals` feature only.