From 73b130b46e7e21dc9a627b25367beda9591ee321 Mon Sep 17 00:00:00 2001 From: Robert Lowry Date: Sat, 16 Nov 2024 23:03:49 -0600 Subject: [PATCH] support multiline labels --- parser.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/parser.go b/parser.go index 1f14013..8a77c6f 100644 --- a/parser.go +++ b/parser.go @@ -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