Skip to content

Commit

Permalink
support multiline labels
Browse files Browse the repository at this point in the history
  • Loading branch information
bobertlo committed Nov 17, 2024
1 parent f0fa36a commit 73b130b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ func parseLabels(p *parser) parseStateFn {
p.currentLine.labels = append(p.currentLine.labels, p.nextToken.val)
nextToken := p.next()

// just consume newlines and comments for now
if nextToken.typ == tokNewline || nextToken.typ == tokComment {
p.next()
return parseLabels
}

if nextToken.typ != tokText {
p.err = fmt.Errorf("line %d: label or op expected, got '%s'", p.line, nextToken)
return nil
Expand Down

0 comments on commit 73b130b

Please sign in to comment.