mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 12:51:57 +00:00
feat(printer) Print ContinueStatement (#1276)
This commit is contained in:
parent
4ea0aacdb4
commit
2adfec6c0f
1 changed files with 9 additions and 1 deletions
|
|
@ -153,7 +153,15 @@ impl<'a> Format<'a> for DoWhileStatement<'a> {
|
|||
|
||||
impl<'a> Format<'a> for ContinueStatement {
|
||||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
Doc::Line
|
||||
let mut parts = p.vec();
|
||||
parts.push(string!(p, "continue"));
|
||||
|
||||
if let Some(label) = &self.label {
|
||||
parts.push(string!(p, " "));
|
||||
parts.push(format!(p, label));
|
||||
}
|
||||
|
||||
Doc::Array(parts)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue