build: support comments in functions (#41)

This commit is contained in:
Michael McLoughlin
2019-01-11 10:33:41 -08:00
parent 27cea3be8b
commit 284ee13ada
10 changed files with 117 additions and 23 deletions

View File

@@ -18,6 +18,7 @@ func TestLabelTarget(t *testing.T) {
f := ir.NewFunction("happypath")
for lbl, i := range expect {
f.AddLabel(lbl)
f.AddComment("comments should be ignored")
f.AddInstruction(i)
f.AddInstruction(&ir.Instruction{Opcode: "IDK"})
}