File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ public bool DoAllModulesHaveLibraries() =>
205205
206206 public bool IsCLIGenerator => GeneratorKind == GeneratorKind . CLI ;
207207
208+ public bool IsJSGenerator => GeneratorKind == GeneratorKind . Emscripten || GeneratorKind == GeneratorKind . QuickJS ;
209+
208210 public readonly List < string > DependentNameSpaces = new List < string > ( ) ;
209211 public bool MarshalCharAsManagedChar { get ; set ; }
210212 public bool MarshalConstCharArrayAsString { get ; set ; } = true ;
Original file line number Diff line number Diff line change @@ -184,6 +184,14 @@ public override bool VisitFunctionDecl(Function function)
184184 return false ;
185185 }
186186
187+ if ( Options . IsJSGenerator && function is Method { Kind : CXXMethodKind . Normal } && ret . Type . GetFinalPointee ( ) . IsClass ( ) )
188+ {
189+ function . ExplicitlyIgnore ( ) ;
190+ Diagnostics . Debug ( "Function '{0}' was ignored due to {1} return decl not yet implemented in JS generators" ,
191+ function . Name , msg ) ;
192+ return false ;
193+ }
194+
187195 foreach ( var param in function . Parameters )
188196 {
189197 if ( HasInvalidDecl ( param , out msg ) )
You can’t perform that action at this time.
0 commit comments