public PropertyGenerator(Class @class, IDiagnosticConsumer log)
 {
     this.log = log;
     foreach (var method in @class.Methods.Where(
         m => !m.IsConstructor && !m.IsDestructor && !m.IsOperator && m.IsGenerated))
         DistributeMethod(method);
 }
示例#2
0
 public PropertyGenerator(Class @class, IDiagnosticConsumer log)
 {
     this.log = log;
     foreach (var method in @class.Methods.Where(
                  m => !m.IsConstructor && !m.IsDestructor && !m.IsOperator && m.IsGenerated))
     {
         DistributeMethod(method);
     }
 }
示例#3
0
 public Driver(DriverOptions options, IDiagnosticConsumer diagnostics)
 {
     Options               = options;
     Diagnostics           = diagnostics;
     Project               = new Project();
     ASTContext            = new ASTContext();
     Symbols               = new SymbolContext();
     TypeDatabase          = new TypeMapDatabase();
     TranslationUnitPasses = new PassBuilder <TranslationUnitPass>(this);
     GeneratorOutputPasses = new PassBuilder <GeneratorOutputPass>(this);
 }
示例#4
0
        public static void EmitError(this IDiagnosticConsumer consumer,
                                     DiagnosticId id, string msg, params object[] args)
        {
            var diagInfo = new DiagnosticInfo
            {
                Kind    = DiagnosticKind.Error,
                Message = string.Format(msg, args)
            };

            consumer.Emit(diagInfo);
        }
示例#5
0
        public static void EmitError(this IDiagnosticConsumer consumer,
                                     string msg)
        {
            var diagInfo = new DiagnosticInfo
            {
                Kind    = DiagnosticKind.Error,
                Message = msg
            };

            consumer.Emit(diagInfo);
        }
示例#6
0
 public Driver(DriverOptions options, IDiagnosticConsumer diagnostics)
 {
     Options                 = options;
     Diagnostics             = diagnostics;
     Parser                  = new Parser(Options);
     Parser.OnHeaderParsed  += OnFileParsed;
     Parser.OnLibraryParsed += OnFileParsed;
     TypeDatabase            = new TypeMapDatabase();
     TranslationUnitPasses   = new PassBuilder <TranslationUnitPass>(this);
     GeneratorOutputPasses   = new PassBuilder <GeneratorOutputPass>(this);
 }
示例#7
0
文件: Driver.cs 项目: tritao/CppSharp
 public Driver(DriverOptions options, IDiagnosticConsumer diagnostics)
 {
     Options = options;
     Diagnostics = diagnostics;
     Project = new Project();
     ASTContext = new ASTContext();
     Symbols = new SymbolContext();
     Delegates = new Dictionary<Function, DelegatesPass.DelegateDefinition>();
     TypeDatabase = new TypeMapDatabase();
     TranslationUnitPasses = new PassBuilder<TranslationUnitPass>(this);
     GeneratorOutputPasses = new PassBuilder<GeneratorOutputPass>(this);
 }
 public DeclarationName(IDiagnosticConsumer diagnostics)
 {
     this.diagnostics = diagnostics;
     methodSignatures = new Dictionary<string, int>();
 }
示例#9
0
 public DiagnosticsEngine(IDiagnosticConsumer consumer)
 {
     Consumer = consumer;
 }
示例#10
0
 public DeclarationName(IDiagnosticConsumer diagnostics)
 {
     this.diagnostics = diagnostics;
     methodSignatures = new Dictionary <string, int>();
 }
示例#11
0
 public static void Debug(this IDiagnosticConsumer consumer,
                          string msg, params object[] args)
 {
     consumer.Debug(DiagnosticId.None, msg, args);
 }