getTextFromCtx method
Return the text of all tokens in the source interval of the specified context. This method behaves like the following code, including potential exceptions from the call to {@link #getText(Interval)}, but may be optimized by the specific implementation.
If {@code ctx.getSourceInterval()} does not return a valid interval of tokens provided by this stream, the behavior is unspecified.
@param ctx The context providing the source interval of tokens to get
text for.
@return The text of all tokens within the source interval of ctx
.
Implementation
@override
String getTextFromCtx(RuleContext ctx) {
return getText(ctx.sourceInterval);
}