1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
//
// Mono.ILASM.Report
//
// Author(s):
// Jackson Harper (Jackson@LatitudeGeo.com)
//
// (C) 2003 Jackson Harper, All rights reserved
//
using System;
using System.IO;
namespace Mono.ILASM {
public class Report {
private int error_count;
private int mark_count;
public Report ()
{
error_count = 0;
}
public int ErrorCount {
get { return error_count; }
}
public void Mark ()
{
mark_count = error_count;
}
public bool ErrorSinceMark ()
{
return (error_count > mark_count);
}
public void AssembleFile (string file, string listing,
string target, string output)
{
Console.WriteLine ("Assembling '{0}' , {1}, to {2} --> '{3}'", file,
GetListing (listing), target, output);
}
public void Error (int num, string message, Location location)
{
error_count++;
Console.WriteLine ("{0} Error {1}: {2}",
num, location, message);
}
private string GetListing (string listing)
{
if (listing == null)
return "no listing file";
return listing;
}
}
}
|