diff --git a/asm/asm.go b/asm/asm.go index bd3c74a..65d8c38 100644 --- a/asm/asm.go +++ b/asm/asm.go @@ -78,7 +78,6 @@ func (a *Assembler) Load(filename string) error { return in.Errorf(`error calling macro "%s": %v`, m.Name, err) } lineSources = append([]lines.LineSource{subLs}, lineSources...) - continue // no need to append case inst.TypeIfdef: if len(in.Exprs) == 0 { panic(fmt.Sprintf("Ifdef got parsed with no expression: %s", line)) @@ -106,7 +105,6 @@ func (a *Assembler) Load(filename string) error { return in.Errorf("error including file: %v", err) } lineSources = append([]lines.LineSource{subLs}, lineSources...) - continue // no need to append case inst.TypeTarget: return in.Errorf("target not (yet) implemented: %s", line) case inst.TypeSegment: diff --git a/asm/flavors/scma/scma.go b/asm/flavors/scma/scma.go index c53f05f..2520595 100644 --- a/asm/flavors/scma/scma.go +++ b/asm/flavors/scma/scma.go @@ -543,6 +543,7 @@ func (a *SCMA) parseTerm(in inst.I, lp *lines.Parse) (*expr.E, error) { } ex.Op = expr.OpLeaf ex.Val = uint16(c) + lp.Consume("'") // optional closing quote lp.Ignore() return top, nil } diff --git a/asm/flavors/tests/simple_parse_test.go b/asm/flavors/tests/simple_parse_test.go index 81bbb13..7a1160b 100644 --- a/asm/flavors/tests/simple_parse_test.go +++ b/asm/flavors/tests/simple_parse_test.go @@ -120,6 +120,8 @@ func TestSimpleCommonFunctions(t *testing.T) { {ss, `>SAM AB,$12,"A B","A, B, "" C"`, `{call SAM {"AB", "$12", "A B", "A, B, \" C"}}`, ""}, {ss, " LDX #']+$80", "{LDX/imm (lsb (+ $005d $0080))}", "a2dd"}, + + {ss, " CMP #';'+1", "{CMP/imm (lsb (+ $003b $0001))}", "c93c"}, } // TODO(zellyn): Add tests for finalization of four SCMA directives: