/** * Display the type of nodes and optionally the * first token. */ private Object showNode(Node node, Object data) { String tokens = ""; String special = ""; Token t; if (showTokens) { // TODO: Token reference t = node.getFirstToken(); if (t.specialToken != null && ! t.specialToken.image.startsWith("##")) special = t.specialToken.image; tokens = " -> " + special + t.image; } System.out.println(indentString() + node + tokens); ++indent; data = node.childrenAccept(this, data); --indent; return data; }
/** * Display the type of nodes and optionally the * first token. */ private Object showNode(Node node, Object data) { String tokens = ""; String special = ""; Token t; if (showTokens) { t = node.getFirstToken(); if (t.specialToken != null && ! t.specialToken.image.startsWith("##")) special = t.specialToken.image; tokens = " -> " + special + t.image; } System.out.println(indentString() + node + tokens); ++indent; data = node.childrenAccept(this, data); --indent; return data; }
/** * Display the type of nodes and optionally the * first token. */ private Object showNode(Node node, Object data) { String tokens = ""; String special = ""; Token t; if (showTokens) { t = node.getFirstToken(); if (t.specialToken != null && ! t.specialToken.image.startsWith("##")) special = t.specialToken.image; tokens = " -> " + special + t.image; } System.out.println(indentString() + node + tokens); ++indent; data = node.childrenAccept(this, data); --indent; return data; }
/** * Display the type of nodes and optionally the * first token. */ private Object showNode(Node node, Object data) { String tokens = ""; String special = ""; Token t; if (showTokens) { t = node.getFirstToken(); if (t.specialToken != null && ! t.specialToken.image.startsWith("##")) special = t.specialToken.image; tokens = " -> " + special + t.image; } System.out.println(indentString() + node + tokens); ++indent; data = node.childrenAccept(this, data); --indent; return data; }