func (assembler *LineList) ParseDS(currentLine string) error { source := token.NewSource(currentLine) temp := line.NewDS() err := temp.Parse(source) if err != nil { return err } assembler.Lines = append(assembler.Lines, temp) return nil }
func TestDSParse(t *testing.T) { testCaseList := []testCaseForTestDSParse{ {data: ` DS 1234`}, {data: ` DS #10 ; COMMENT`}, {data: `LABEL DS #FFFF ; COMMENT`}, } for _, testCase := range testCaseList { testData := testCase.data ds := line.NewDS() source := token.NewSource(testData) err := ds.Parse(source) if err != nil { t.Error(err) } // t.Error(ds) } }