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:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user