8 files changed,
24 insertions(+),
6 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-06-08 21:10:56 +0300
Authored at:
2026-06-08 21:07:36 +0300
Change ID:
zwmnunvrkksqwvzklnmsltkpqmsowoov
Parent:
7b1aef3
jump to
M
journal/parser/parser.go
··· 597 597 s := p.cur.Span 598 598 p.expect(token.N) 599 599 p.skipWhitespace() 600 + 601 + id := &ast.IgnoredDirective{} 600 602 if p.got(token.TEXT) || p.got(token.COMMODITYMARK) { 603 + id.Text = p.cur.Literal 601 604 p.advance() 602 605 } 603 606 p.skipWhitespace() 604 - comment := p.parseOptInlineComment() 607 + id.Comment = p.parseOptInlineComment() 608 + 605 609 p.expectNewline() 606 - return &ast.IgnoredDirective{ 607 - Comment: comment, 608 - Span: p.span(s), 609 - } 610 + id.Span = p.span(s) 611 + return id 610 612 } 611 613 612 614 func (p *Parser) parseMarketPriceDirective() *ast.MarketPriceDirective {
M
journal/printer/directives.go
··· 117 117 p.writeInlineComment(e.Comment) 118 118 } 119 119 120 +func (p *printer) writeIgnoredDirective(e *ast.IgnoredDirective) { 121 + p.buf.WriteString("N ") 122 + p.buf.WriteString(e.Text) 123 + p.writeInlineComment(e.Comment) 124 +} 125 + 120 126 func quoteString(s string) string { 121 127 needsQuote := false 122 128 for _, c := range s {