Skip to content

Commit 57c7be1

Browse files
committed
Registrable: fix lua artifacts
1 parent 4682c1f commit 57c7be1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Generator/Generators/Registrable/Lua/Sol/LuaSolSources.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,6 @@ public virtual void GenerateNamespace(Namespace @namespace)
261261

262262
public virtual bool CanGenerateNamespace(Namespace @namespace)
263263
{
264-
// if not self:isNonTemplateAllowed(context) then
265-
// return true
266-
// end
267264
if (AlreadyVisited(@namespace))
268265
{
269266
return false;
@@ -272,6 +269,10 @@ public virtual bool CanGenerateNamespace(Namespace @namespace)
272269
{
273270
return false;
274271
}
272+
else if (!NonTemplateAllowed)
273+
{
274+
return false;
275+
}
275276
return @namespace.IsGenerated;
276277
}
277278

@@ -466,9 +467,6 @@ public virtual void GenerateEnumDecl(Enumeration enumeration)
466467

467468
public virtual bool CanGenerateEnumDecl(Enumeration enumeration)
468469
{
469-
// if not self:isNonTemplateAllowed(context) then
470-
// return true
471-
// end
472470
if (AlreadyVisited(enumeration))
473471
{
474472
return false;
@@ -477,6 +475,10 @@ public virtual bool CanGenerateEnumDecl(Enumeration enumeration)
477475
{
478476
return false;
479477
}
478+
else if (!NonTemplateAllowed)
479+
{
480+
return false;
481+
}
480482
return enumeration.IsGenerated;
481483
}
482484

0 commit comments

Comments
 (0)