mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
feat(printer) Print ThrowStatement (#1275)
This commit is contained in:
parent
f892a9e8a1
commit
4ea0aacdb4
1 changed files with 6 additions and 1 deletions
|
|
@ -203,7 +203,12 @@ impl<'a> Format<'a> for TryStatement<'a> {
|
|||
|
||||
impl<'a> Format<'a> for ThrowStatement<'a> {
|
||||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
Doc::Line
|
||||
let mut parts = p.vec();
|
||||
parts.push(string!(p, "throw "));
|
||||
parts.push(string!(p, " "));
|
||||
parts.push(format!(p, self.argument));
|
||||
|
||||
Doc::Array(parts)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue