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() =>
205
205
206
206
public bool IsCLIGenerator => GeneratorKind == GeneratorKind . CLI ;
207
207
208
+ public bool IsJSGenerator => GeneratorKind == GeneratorKind . Emscripten || GeneratorKind == GeneratorKind . QuickJS ;
209
+
208
210
public readonly List < string > DependentNameSpaces = new List < string > ( ) ;
209
211
public bool MarshalCharAsManagedChar { get ; set ; }
210
212
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)
184
184
return false ;
185
185
}
186
186
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
+
187
195
foreach ( var param in function . Parameters )
188
196
{
189
197
if ( HasInvalidDecl ( param , out msg ) )
You can’t perform that action at this time.
0 commit comments