}
static void tree(Node node, TokenParser parser, String endName) {
Token token;
TagToken tag;
MacroToken macro;
while( parser.hasNext() ) {
token = parser.next();
switch(token.getType()) {
case TOKEN_FIXED :
TextNode tn = new TextNode((FixedToken)token);
node.add(tn);
break;
case TOKEN_NOTE :
break;
case TOKEN_MACRO :
macro = (MacroToken) token;
if ( macro.getMacroName().equalsIgnoreCase(endName) ) {
return;
}
try {
MacroNode mn = new MacroNode((MacroToken) token);
node.add(mn);