translateOnlyChild

fun <T> ParseTreeToASTTransformer.translateOnlyChild(parent: ParserRuleContext): T

Translate the only child (of type ParseRuleContext) and ensure the resulting value as the expected type.

Example:

registerNodeFactory<MemberDeclarationContext, JEntityMember> {
translateOnlyChild<JEntityMember>(this)
}