summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram/Define.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-09 07:02:43 +0100
committerSven Gothel <[email protected]>2015-03-09 07:02:43 +0100
commit5dd12c17bf5037c7ac6a2ac73caf4d61443c4749 (patch)
treec7d236cfbf44544852fcdab31ad44130471032f0 /src/java/com/jogamp/gluegen/cgram/Define.java
parent8efdf71e2de6392344326ba6a28e8f8fa7e3e8e5 (diff)
Bug 1134 - Add ASTLocusTagProvider for Define and fix newline in c-parser (Expose source location for log/error messages)
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram/Define.java')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/Define.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/Define.java b/src/java/com/jogamp/gluegen/cgram/Define.java
index 797cf6f..23caabd 100644
--- a/src/java/com/jogamp/gluegen/cgram/Define.java
+++ b/src/java/com/jogamp/gluegen/cgram/Define.java
@@ -39,18 +39,32 @@
package com.jogamp.gluegen.cgram;
+import com.jogamp.gluegen.ASTLocusTag;
+import com.jogamp.gluegen.ASTLocusTag.ASTLocusTagProvider;
+
/** Represents a #define of a literal to a value (a number represented
in string form.) */
-public class Define {
+public class Define implements ASTLocusTagProvider {
private final String name;
private final String value;
+ private final ASTLocusTag astLocus;
public Define(final String name, final String value) {
this.name = name;
this.value = value;
+ this.astLocus = null;
+ }
+
+ public Define(final String name, final String value, final ASTLocusTag astLocus) {
+ this.name = name;
+ this.value = value;
+ this.astLocus = astLocus;
}
public String getName() { return name; }
public String getValue() { return value; }
+
+ @Override
+ public ASTLocusTag getASTLocusTag() { return astLocus; }
}