From 8eb9e27bccca4a0cd6a0b1b15bee76576ce030c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Mar 2015 07:28:35 +0100 Subject: Bug 1134 - Add ASTLocationTag, locating source of [semantic] errors while parsing / analyzing New GlueGenException supports ASTLocationTag, which will be throws in case of semantic and/or parsing errors. --- 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 6428469..1e879c7 100644 --- a/src/java/com/jogamp/gluegen/GlueGen.java +++ b/src/java/com/jogamp/gluegen/GlueGen.java @@ -208,12 +208,14 @@ public class GlueGen implements GlueEmitterControls { // iterate over all values in the enumeration for (int i = 0; i < enumeration.getNumEnumerates(); ++i) { final String enumElementName = enumeration.getEnumName(i); - allConstants.add(new ConstantDefinition(enumElementName, enumeration.getEnumValue(i), enumName)); + allConstants.add(new ConstantDefinition(enumElementName, enumeration.getEnumValue(i), + enumName, enumeration.getASTLocusTag())); } } for (final Object elem : lexer.getDefines()) { final Define def = (Define) elem; - allConstants.add(new ConstantDefinition(def.getName(), def.getValue())); + // TODO: Add ASTLocusTag + allConstants.add(new ConstantDefinition(def.getName(), def.getValue(), null)); } allFunctions = headerParser.getParsedFunctions(); -- cgit v1.2.3