From eca019cdea4017227e951d8a9eb30cb34fca4a07 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 7 Mar 2015 08:25:36 +0100 Subject: Bug 1134 - Pass ASTLocationTag to all types, used for GlueGenException Enhances semantic exception in code generation by adding the AST location of the type or function declaration. --- src/java/com/jogamp/gluegen/GlueGen.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/java/com/jogamp/gluegen/GlueGen.java') diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java index 2833154..4ef5648 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -73,6 +73,8 @@ public class GlueGen implements GlueEmitterControls { private static Level logLevel = null; + public static void setDebug(final boolean v) { debug=v; } + public static void setLogLevel(final Level l) { logLevel=l; } public static boolean debug() { return debug; } @Override @@ -330,12 +332,12 @@ public class GlueGen implements GlueEmitterControls { for (final Iterator iter = referencedStructs.results(); iter.hasNext();) { final Type t = iter.next(); if (t.isCompound()) { - assert t.hasTypedefName() && t.getName() == null : "ReferencedStructs incorrectly recorded compound type " + t; + assert t.isTypedef() && t.getName() == null : "ReferencedStructs incorrectly recorded compound type " + t; emit.emitStruct(t.asCompound(), null); } else if (t.isPointer()) { final PointerType p = t.asPointer(); final CompoundType c = p.getTargetType().asCompound(); - assert p.hasTypedefName() && c.getName() == null : "ReferencedStructs incorrectly recorded pointer type " + p; + assert p.isTypedef() && c.getName() == null : "ReferencedStructs incorrectly recorded pointer type " + p; emit.emitStruct(c, p); } } -- cgit v1.2.3