aboutsummaryrefslogtreecommitdiffstats
path: root/src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g
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/antlr/com/jogamp/gluegen/cgram/GnuCParser.g
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/antlr/com/jogamp/gluegen/cgram/GnuCParser.g')
-rw-r--r--src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g b/src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g
index e8ca8c5..bf01b12 100644
--- a/src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g
+++ b/src/antlr/com/jogamp/gluegen/cgram/GnuCParser.g
@@ -23,6 +23,7 @@ header {
import antlr.CommonAST;
import antlr.DumpASTVisitor;
+ import com.jogamp.gluegen.ASTLocusTag;
}
@@ -715,7 +716,7 @@ tokens {
public void addDefine(String name, String value)
{
- defines.add(new Define(name, value));
+ defines.add(new Define(name, value, new ASTLocusTag(lineObject.getSource(), lineObject.getLine()+deferredLineCount, -1, name)));
}
/** Returns a list of Define objects corresponding to the