Skip to content

Commit 2bee62c

Browse files
committed
sh: fix todo
1 parent 02549fa commit 2bee62c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sh/src/parse/command_parser.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,11 @@ impl<'src> CommandParser<'src> {
589589
body: Rc::from(body),
590590
})
591591
} else {
592-
todo!("error: expected compound command")
592+
Err(ParserError::new(
593+
self.lookahead_lineno,
594+
"expected compound command",
595+
self.lookahead == CommandToken::EOF,
596+
))
593597
}
594598
}
595599

0 commit comments

Comments
 (0)