public void emitlabel(int i) { Console.WriteLine("L" + i + ":"); //CodeRow row = rows.Count>0?rows[rows.Count - 1]:new CodeRow(); CodeRow row = new CodeRow(); row.labelNum = i; row.labelStr = "L" + i; //row.command = "L" + i + ":"; rows.Add(row); }
public void emit(string s) { Console.WriteLine("\t" + s); /* * CodeRow row = new CodeRow(); * row.command = "\t" + s; * rows.Add(row); */ CodeRow row = rows.Count > 0 ? rows[rows.Count - 1] : new CodeRow(); if (row.command == null) { row.command = "\t" + s; } else { CodeRow rowEx = new CodeRow(); rowEx.command = "\t" + s; rows.Add(rowEx); } }