Read repeated point spellings in a fixed order and end comments at a carriage return

Two spellings of one curve point, as v064 and v64, now give the same
result each time. A line comment ends at a lone carriage return, as in
sfizz. Header.Set's documentation says an include in the header's range
can override what it sets.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 00:46:19 +00:00
co-authored by Claude Sonnet 5.5
parent 37d2866fe9
commit 535856ba77
5 changed files with 45 additions and 4 deletions
+2 -1
View File
@@ -103,7 +103,8 @@ func lex(src string) []*Node {
l.add(src, j, &Node{Kind: KindSpace})
case strings.HasPrefix(rest, "//"):
j := len(src)
if e := strings.IndexByte(rest, '\n'); e >= 0 {
// A comment ends at either character of a line break, as in sfizz.
if e := strings.IndexAny(rest, "\r\n"); e >= 0 {
j = i + e
}
l.add(src, j, &Node{Kind: KindComment})