From c1d4aef4377ca5102e3f79bf9027f7f801263218 Mon Sep 17 00:00:00 2001 From: krishna_gadepalli Date: Mon, 5 Mar 2007 19:56:27 +0000 Subject: - Add a fix (from Ken Russel) for properly parsing negative constants in enums by adding getAllChildrenText() - Fixed the lineDirective() method in PCPP.java to emit the correct format of the line directive git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@58 a78bb65f-1512-4460-ba86-f6dc96a7bf27 --- src/java/com/sun/gluegen/cgram/TNode.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/java/com/sun/gluegen/cgram/TNode.java') diff --git a/src/java/com/sun/gluegen/cgram/TNode.java b/src/java/com/sun/gluegen/cgram/TNode.java index f5b2c17..9fca506 100644 --- a/src/java/com/sun/gluegen/cgram/TNode.java +++ b/src/java/com/sun/gluegen/cgram/TNode.java @@ -153,6 +153,16 @@ public void initialize(AST tr) { text = text_; } + /** Returns the text for this node and all children */ + public String getAllChildrenText() { + StringBuffer buf = new StringBuffer(); + buf.append(getText()); + for (TNode node = (TNode) getFirstChild(); node != null; node = (TNode) node.getNextSibling()) { + buf.append(node.getText()); + } + return buf.toString(); + } + /** return the last child of this node, or null if there is none */ public TNode getLastChild() { TNode down = (TNode)getFirstChild(); -- cgit v1.2.3