diff --git a/printer/printer.go b/printer/printer.go index d5e25dc9..fc0ab693 100644 --- a/printer/printer.go +++ b/printer/printer.go @@ -29,6 +29,7 @@ type Printer struct { Bool PrintFunc String PrintFunc Number PrintFunc + Comment PrintFunc } func defaultLineNumberFormat(num int) string { @@ -82,6 +83,11 @@ func (p *Printer) property(tk *token.Token) *Property { return p.Number() } return prop + case token.CommentType: + if p.Comment != nil { + return p.Comment() + } + return prop default: } return prop