|
|
|
@ -28,7 +28,7 @@ namespace CppSharp |
|
|
|
public int Column; |
|
|
|
public int Column; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public interface IDiagnosticConsumer |
|
|
|
public interface IDiagnostics |
|
|
|
{ |
|
|
|
{ |
|
|
|
void Emit(DiagnosticInfo info); |
|
|
|
void Emit(DiagnosticInfo info); |
|
|
|
void PushIndent(int level); |
|
|
|
void PushIndent(int level); |
|
|
|
@ -37,7 +37,7 @@ namespace CppSharp |
|
|
|
|
|
|
|
|
|
|
|
public static class DiagnosticExtensions |
|
|
|
public static class DiagnosticExtensions |
|
|
|
{ |
|
|
|
{ |
|
|
|
public static void Debug(this IDiagnosticConsumer consumer, |
|
|
|
public static void Debug(this IDiagnostics consumer, |
|
|
|
string msg, params object[] args) |
|
|
|
string msg, params object[] args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
@ -49,7 +49,7 @@ namespace CppSharp |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void Message(this IDiagnosticConsumer consumer, |
|
|
|
public static void Message(this IDiagnostics consumer, |
|
|
|
string msg, params object[] args) |
|
|
|
string msg, params object[] args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
@ -61,7 +61,7 @@ namespace CppSharp |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void Warning(this IDiagnosticConsumer consumer, |
|
|
|
public static void Warning(this IDiagnostics consumer, |
|
|
|
string msg, params object[] args) |
|
|
|
string msg, params object[] args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
@ -73,7 +73,7 @@ namespace CppSharp |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void Error(this IDiagnosticConsumer consumer, |
|
|
|
public static void Error(this IDiagnostics consumer, |
|
|
|
string msg, params object[] args) |
|
|
|
string msg, params object[] args) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
@ -85,7 +85,7 @@ namespace CppSharp |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
consumer.Emit(diagInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void Error(this IDiagnosticConsumer consumer, |
|
|
|
public static void Error(this IDiagnostics consumer, |
|
|
|
string msg) |
|
|
|
string msg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
var diagInfo = new DiagnosticInfo |
|
|
|
@ -98,7 +98,7 @@ namespace CppSharp |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public class TextDiagnosticPrinter : IDiagnosticConsumer |
|
|
|
public class TextDiagnosticPrinter : IDiagnostics |
|
|
|
{ |
|
|
|
{ |
|
|
|
public Stack<int> Indents; |
|
|
|
public Stack<int> Indents; |
|
|
|
public DiagnosticKind Level; |
|
|
|
public DiagnosticKind Level; |
|
|
|
|