CharTable (ASTNode tree) { for (ASTNode o = tree; o != null; o = o.getTreeParent()) { CharTable charTable = o.getUserData(CharTable.CHAR_TABLE_KEY); if (charTable != null) { return charTable; } if (o instanceof FileASTNode) { return ((FileASTNode)o).getCharTable(); } } throw new AssertionError("CharTable not found in: " + tree); }