Skip to content

Commit

Permalink
juledoc: fix a nil AST may crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jan 19, 2025
1 parent 5ab6a32 commit faf4e84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builder/builder.jule
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ impl Builder {
// Builds and returns documentation.
// Will not dispatch meta.
fn BuildPartial(self, mut ast: &ast::AST, mut cm: &CommentMap): []&doc::Doc {
if ast == nil {
ret nil
}
self.fmt.cm = cm
mut doc := make([]&doc::Doc, 0)
mut i := 0
Expand Down

0 comments on commit faf4e84

Please sign in to comment.