mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
using CppSharp.AST; |
|
using CppSharp.Types; |
|
|
|
namespace CppSharp.Generators.CSharp |
|
{ |
|
public class CSharpExpressionPrinterResult |
|
{ |
|
public string Value; |
|
|
|
public override string ToString() |
|
{ |
|
return Value; |
|
} |
|
} |
|
|
|
public static class CSharpExpressionPrinterExtensions |
|
{ |
|
public static CSharpExpressionPrinterResult CSharpValue(this Expression value, |
|
CSharpExpressionPrinter printer) |
|
{ |
|
return value.Visit(printer); |
|
} |
|
|
|
} |
|
public class CSharpExpressionPrinter : IExpressionPrinter<CSharpExpressionPrinterResult>, |
|
IExpressionVisitor<CSharpExpressionPrinterResult> |
|
{ |
|
public CSharpExpressionPrinterResult VisitBuiltinExpression(BuiltinTypeExpression builtinType) |
|
{ |
|
return new CSharpExpressionPrinterResult() |
|
{ |
|
Value = builtinType.ToString(), |
|
}; |
|
} |
|
|
|
public string ToString(Type type) |
|
{ |
|
throw new System.NotImplementedException(); |
|
} |
|
} |
|
} |