Map tokens = dupTokStream(ast);
return dupTree(ast, tokens);
}
private static LinkedListTree dupTree(LinkedListTree ast, Map tokens) {
LinkedListToken newTok = (LinkedListToken)tokens.get(ast.getToken());
LinkedListTree result = new LinkedListTree(newTok);
result.setStartToken((LinkedListToken)tokens.get(ast.getStartToken()));
result.setStopToken((LinkedListToken)tokens.get(ast.getStopToken()));
result.setTokenListUpdater(ast.getTokenListUpdater());
result.setInitialInsertionAfter(ast.getInitialInsertionAfter());