Keep = signs in opcode values

An opcode's value now ends at whitespace followed by the next opcode, so
sample=A=440.wav is one value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 18:18:40 +00:00
co-authored by Claude Sonnet 5.5
parent cf54471778
commit a5376118f9
2 changed files with 28 additions and 3 deletions
+4 -3
View File
@@ -16,9 +16,10 @@ var (
// includeRE reads an #include's quoted path.
includeRE = regexp.MustCompile(`^#include[ \t]+"([^"\r\n]*)"`)
// breakRE finds where an opcode's value ends: at a header, the next
// opcode, a comment, a directive after whitespace, or the end of the line,
// so that a value can hold spaces, as a sample's path can.
breakRE = regexp.MustCompile(`<[A-Za-z_]+>|[A-Za-z0-9_$]+=|//|/\*|\s#(?:define|include)\b|\n`)
// opcode after whitespace, a comment, a directive after whitespace, or the
// end of the line, so that a value can hold spaces and = signs, as a
// sample's path can.
breakRE = regexp.MustCompile(`<[A-Za-z_]+>|\s[A-Za-z0-9_$]+=|//|/\*|\s#(?:define|include)\b|\n`)
)
// byteOrderMark is the UTF-8 mark some editors put at the start of a file. It