LighterASTNode (@NotNull LighterASTNode node) { if (node instanceof ProductionMarker) { return ((ProductionMarker)node).myParent; } if (node instanceof Token) { return ((Token)node).myParentNode; } throw new UnsupportedOperationException("Unknown node type: " + node); }